Skip to content
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

error when importing opennem #23

Open
laestis opened this issue Jun 14, 2024 · 0 comments
Open

error when importing opennem #23

laestis opened this issue Jun 14, 2024 · 0 comments

Comments

@laestis
Copy link

laestis commented Jun 14, 2024

Hello,

I installed successfully opennem but when I want to use it I have the following error:
ipython
Python 3.8.5 (default, Sep 4 2020, 07:30:14)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.12.3 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import opennem

TypeError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import opennem

File ~/anaconda3/lib/python3.8/site-packages/opennem/init.py:24
20 PATH_CWD = Path.cwd()
22 from opennem.settings import settings # noqa
---> 24 from .client import OpenNEMClient # noqa
26 api = OpenNEMClient()

File ~/anaconda3/lib/python3.8/site-packages/opennem/client.py:14
12 from opennem.schema.network import FueltechSchema, NetworkRegionSchema, NetworkSchema
13 from opennem.settings import settings
---> 14 from opennem.utils.http import http
16 logger = logging.getLogger("opennem.api")
19 class OpenNEMStats(object):

File ~/anaconda3/lib/python3.8/site-packages/opennem/utils/http.py:55
51 kwargs["timeout"] = self.timeout
52 return super().send(request, **kwargs)
---> 55 retry_strategy = Retry(
56 total=DEFAULT_RETRIES,
57 backoff_factor=1,
58 status_forcelist=[403, 429, 500, 502, 503, 504],
59 method_whitelist=["HEAD", "GET", "OPTIONS"],
60 )
63 http = requests.Session()
65 adapter_timeout = TimeoutHTTPAdapter()

TypeError: init() got an unexpected keyword argument 'method_whitelist'

Thanks or help and insights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant