Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: __init__() got an unexpected keyword argument 'requote' #5224

Closed
3 tasks done
Liftyee opened this issue Aug 12, 2020 · 1 comment
Closed
3 tasks done

TypeError: __init__() got an unexpected keyword argument 'requote' #5224

Liftyee opened this issue Aug 12, 2020 · 1 comment
Labels
duplicate This is a duplicate of another issue or PR.

Comments

@Liftyee
Copy link

Liftyee commented Aug 12, 2020

Summary

When I run a simple discord.py code, it produces an error instead of working as expected.

Reproduction Steps

import discord.py
client = discord.Client()

@client.event
async def on_ready():
	print('We have logged in as {0.user}'.format(client))

@client.event
async def on_message(message):
	print("a message received")
	
@client.event
async def on_reaction_add(reaction, user):
	print(reaction)
	print(user)

client.run('[token]')

Expected Results

It reacts when a message is sent in a server and prints reaction details when a reaction is added.

Actual Results

Traceback (most recent call last):
  File "discord bot rolemanager.py", line 25, in <module>
    import discord.py
  File "/home/victor/.local/lib/python3.6/site-packages/discord/__init__.py", line 25, in <module>
    from .client import Client
  File "/home/victor/.local/lib/python3.6/site-packages/discord/client.py", line 34, in <module>
    import aiohttp
  File "/home/victor/.local/lib/python3.6/site-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import BaseConnector as BaseConnector
  File "/home/victor/.local/lib/python3.6/site-packages/aiohttp/client.py", line 30, in <module>
    from yarl import URL
  File "/home/victor/.local/lib/python3.6/site-packages/yarl/__init__.py", line 1, in <module>
    from ._url import URL, cache_clear, cache_configure, cache_info
  File "/home/victor/.local/lib/python3.6/site-packages/yarl/_url.py", line 56, in <module>
    @rewrite_module
  File "/home/victor/.local/lib/python3.6/site-packages/yarl/_url.py", line 132, in URL
    _QUERY_PART_QUOTER = _Quoter(safe="?/:@", qs=True, requote=False)
  File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__
TypeError: __init__() got an unexpected keyword argument 'requote'

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

System Information

python -m discord -v returns /usr/bin/python: No module named discord, however
python3 -m discord -v returns

  File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/victor/.local/lib/python3.6/site-packages/discord/__init__.py", line 25, in <module>
    from .client import Client
  File "/home/victor/.local/lib/python3.6/site-packages/discord/client.py", line 34, in <module>
    import aiohttp
  File "/home/victor/.local/lib/python3.6/site-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import BaseConnector as BaseConnector
  File "/home/victor/.local/lib/python3.6/site-packages/aiohttp/client.py", line 30, in <module>
    from yarl import URL
  File "/home/victor/.local/lib/python3.6/site-packages/yarl/__init__.py", line 1, in <module>
    from ._url import URL, cache_clear, cache_configure, cache_info
  File "/home/victor/.local/lib/python3.6/site-packages/yarl/_url.py", line 56, in <module>
    @rewrite_module
  File "/home/victor/.local/lib/python3.6/site-packages/yarl/_url.py", line 132, in URL
    _QUERY_PART_QUOTER = _Quoter(safe="?/:@", qs=True, requote=False)
  File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__
TypeError: __init__() got an unexpected keyword argument 'requote'

Python 3.6.9, Ubuntu 18.04 LTS

@Rapptz
Copy link
Owner

Rapptz commented Aug 12, 2020

Word for word duplicate of #5162

Update yarl, python3 -m pip install -U yarl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This is a duplicate of another issue or PR.
Projects
None yet
Development

No branches or pull requests

2 participants