-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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: function() argument 'code' must be code, not str #6794
Comments
It's pretty unclear what code is producing what error. Do you get this just from importing the module, and nothing else? What line is app.py:74, and what is at helpers.py:607? Your report says aiohttp 3.8.1, which would be this line: Line 607 in dcffb53
Please provide a complete traceback and reproducible code. |
you just execute the command "pip install --upgrade aiohttp", upgrade aitohttp to 3.8.1 |
Hey, I'm running into this as well, looks related to newer version of
So far so good. Upgrading to
(I see the warning about the resolver, along with the "<4.0" requirement. Including in case it helps reproduce.) FWIW this version of |
Oh, well, then there is no issue, as per the pip output: Newer releases require 4.x, older release require 3.x. |
I think this is worth re-opening, it's not clear whether the original reporter achieved this scenario the same way I did. As far as I can tell, this started happening in the last few weeks (same versions). |
I'm also curious about why this is happening since only recently. The breaking change dates back to November 1st 2021 (aio-libs/async-timeout@27f4786). |
This issue just appeared on one of our projects using edit: It must have been a hiccup with |
I think you're the first person to report this while apparently using the correct version of async-timeout. Maybe print out the versions from inside your app to double check, as I've no idea what would cause this otherwise:
If it is the correct version, then file a new issue with traceback and ideally some way to reproduce the issue. |
Describe the bug
class CeilTimeout(async_timeout.timeout):
Here, on class line, it gives me TypeError: function() argument 'code' must be code, not str
To Reproduce
import python_weather
Expected behavior
I am sure but at last it should forecast weather which works fine on windows but gives error on android
Logs/tracebacks
Python Version
Python 3.9.0
aiohttp Version
Version: 3.8.1
multidict Version
Version: 6.0.2
yarl Version
1.7.2
OS
android
Related component
Client
Additional context
https://stackoverflow.com/questions/72676144/typeerror-function-argument-code-must-be-code-not-str/72676439?noredirect=1#comment128378227_72676439
Code of Conduct
The text was updated successfully, but these errors were encountered: