You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Summary
When I run a simple discord.py code, it produces an error instead of working as expected.
Reproduction Steps
Expected Results
It reacts when a message is sent in a server and prints reaction details when a reaction is added.
Actual Results
Checklist
System Information
python -m discord -v
returns/usr/bin/python: No module named discord
, howeverpython3 -m discord -v
returnsPython 3.6.9, Ubuntu 18.04 LTS
The text was updated successfully, but these errors were encountered: