Open liucscai opened 11 months ago
same error here, using debian and MX(debian based), $ python3 --version Python 3.9.2 getting:
File "/home/xxx/.local/lib/python3.9/site-packages/ryanair/ryanair.py", line 133, in get_cheapest_return_flights
response = self._retryable_query(query_url, params)["fares"]
File "/home/xxx/.local/lib/python3.9/site-packages/backoff/_sync.py", line 92, in retry
wait = _init_wait_gen(wait_gen, wait_gen_kwargs)
File "/home/xxx/.local/lib/python3.9/site-packages/backoff/_common.py", line 29, in _init_wait_gen
initialized = wait_gen(**kwargs)
TypeError: 'staticmethod' object is not callable
Thanks for the reports all, a bug may have been introduced in my last refactor, I'll take a look as soon as I get the time.
Acctually downgrading works, so its a way to have it working for time being.
pip3 install ryanair-py==2.3.1
I suspect what's happening here is my most recent changes aren't compatible with python < 3.10
.
Namely, from documentation https://docs.python.org/3/library/functions.html#staticmethod :
Changed in version 3.10: Static methods now inherit the method attributes (module, name, qualname, doc and annotations), have a new wrapped attribute, and are now callable as regular functions.
Python 3.9 isn't EOL until ~the end of 2025, so I will try to fix this at some point.
However, if easy for you, you can just switch to using python >= 3.10
for now :)
The issue is still happening
Yes, I still haven't gotten around to fixing this on python < 3.10
.
To avoid this issue, please use python >= 3.10
for now if you can, or use the previous version of this library ryanair-py==2.3.1
.
Appreciate any feedback on the pull request @cohaolain :)
I followed the instructions and installed ryanair-py on Python version 3.8.10 (Ubuntu Linux installation) I tried running the code in the documentation, but I get the following error:
Thanks in advance