Chris230291 / STB-Proxy

54 stars 36 forks source link

TypeError: __init__() got an unexpected keyword argument 'allowed_methods' #5

Closed rockydares closed 3 years ago

rockydares commented 3 years ago

Previous script was working fine. New script gives this error while trying to run locally (not docker).

Traceback (most recent call last): File "app.py", line 33, in <module> retries = Retry(total=5, backoff_factor=0.2, status_forcelist=[500, 502, 503, 504], allowed_m ods=frozenset(['GET', 'POST'])) TypeError: __init__() got an unexpected keyword argument 'allowed_methods'

Chris230291 commented 3 years ago

It seems you are running an older version of requests or urllib3 (which is normally built in to python package). If this didn't happen before, I think its because I had a typo which meant this option (allowed_methods) wasn't used before.

kettenbach-it commented 3 years ago

@Chris230291 You should a requirements.txt file in the repo. You can create this with "pip freeze >requirements.txt "

kettenbach-it commented 3 years ago

Please accept PR #10 for a requirements.txt

The requirements.txt needs to be updated on every new package installed with "pip install" with the command

pip freeze > requirements.txt