TypeError: function() argument 'code' must be code, not str
See original GitHub issueSituation:
# pip install twtxt
$ twtxt quickstart
Traceback (most recent call last):
File "/usr/local/bin/twtxt", line 5, in <module>
from twtxt.cli import main
File "/usr/local/lib/python3.8/site-packages/twtxt/cli.py", line 29, in <module>
from twtxt.twhttp import get_remote_tweets, get_remote_status
File "/usr/local/lib/python3.8/site-packages/twtxt/twhttp.py", line 17, in <module>
import aiohttp
File "/usr/local/lib/python3.8/site-packages/aiohttp/__init__.py", line 6, in <module>
from .client import * # noqa
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 15, in <module>
from . import connector as connector_mod
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 12, in <module>
from . import hdrs, helpers
File "/usr/local/lib/python3.8/site-packages/aiohttp/helpers.py", line 742, in <module>
class CeilTimeout(Timeout):
TypeError: function() argument 'code' must be code, not str
Environment:
$ uname -sr
OpenBSD 7.0
$ which python3
/usr/local/bin/python3
$ python3 -V
Python 3.8.12
Why?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
function() argument 1 must be code, not str - Stack Overflow
You're getting that exception because, despite its class-like name, threading.Condition is a function, and you cannot subclass functions.
Read more >TypeError: function() argument 'code' must be code, not str ...
Hey, I'm running into this as well, looks related to newer version of async-timeout . ~ $ python3 -m venv env ~ $...
Read more >TypeError: function() argument 'code' must be code, not str
When I run the script below, I get the following error: TypeError: function() argument 'code' must be code, not str.
Read more >function() argument 'code' must be code, not str in Azure ...
I am having below data frame and wanted to save the data frame as a CSV file in the Azure Data lake. My...
Read more >How to solve "function() argument 'code' must be code, not str"?
How to solve " function() argument ' code ' must be code, not str "? 392 views 1 year ago. Python Programming Channel....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
1, Modify setup.py line 32 ‘aiohttp>=2.2.5,❤️’, to ‘aiohttp>=2.2.5,<4’, 2, pip install --upgrade aiohttp
Same on Fedora 36
Environment: