TypeError: function() argument 'code' must be code, not str
nsde opened this issue · 1 comments
nsde commented
Traceback (most recent call last):
File "/home/python/web/lino/librenode/app.py", line 12, in <module>
from dashboard.setups import setups_bp
File "/home/python/web/lino/librenode/dashboard/setups.py", line 4, in <module>
from . import audit
File "/home/python/web/lino/librenode/dashboard/audit.py", line 3, in <module>
import dhooks
… everything normal until here
File "/usr/local/lib/python3.10/site-packages/dhooks/__init__.py", line 1, in <module>
from .client import Webhook
File "/usr/local/lib/python3.10/site-packages/dhooks/client.py", line 3, in <module>
import aiohttp
File "/usr/local/lib/python3.10/site-packages/aiohttp/__init__.py", line 6, in <module>
from .client import (
File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 35, in <module>
from . import hdrs, http, payload
File "/usr/local/lib/python3.10/site-packages/aiohttp/http.py", line 7, in <module>
from .http_parser import (
File "/usr/local/lib/python3.10/site-packages/aiohttp/http_parser.py", line 15, in <module>
from .helpers import NO_EXTENSIONS, BaseTimerContext
File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 667, in <module>
class CeilTimeout(async_timeout.timeout):
TypeError: function() argument 'code' must be code, not str
A part of my code:
import dhooks
hook = Webhook('https://discord.com/api/webhooks/CENSORED-ID/CECENSORED-URL')
embed = dhooks.Embed(
description=text,
color=0x662FE8,
timestamp='now'
)
...
nsde commented
Fix: pip install aiohttp --upgrade