-
Notifications
You must be signed in to change notification settings - Fork 43
Not Working Python 3.9 #20
Comments
Do you have an example of how you are using it? in the simplest possible terms from the interpreter:
|
I have the same issue in python 3.9. For good measure I tried it in python 3.8.8, 3.7.10 and 3.7.3 to see if that matters. I doesn't: the error I get in the end is always "Proxy Pool has been emptied". This is on a macOS 11.2.1. Strangely enough, the same Above the "Proxy Pool" error is a very long list of other exceptions, I've copied only the "raise" statements of +/- 150 of those exceptions below: Fold out trace
Steps to reproduce
from proxy_requests import ProxyRequests
r = ProxyRequests('https://api.ipify.org')
r.get() |
I spoke too soon, now a new python environment on the raspberry also no longer works. Maybe the dependencies create an issue? These are the pip packages in the environment that does work:
These are the pip packages in the environment that does not work:
|
I looked further into this and it certainly has to do with the dependencies. Steps I followed:
certifi==2020.6.20
chardet==3.0.4
idna==2.10
pip==18.1
proxy-requests==0.5.1
requests==2.24.0
setuptools==40.8.0
urllib3==1.25.11
from proxy_requests import ProxyRequests
r = ProxyRequests('https://api.ipify.org')
r.get()
print(r) After updating every package individually, I found that WorkaroundThe workaround is to downgrade the @rootVIII I understand fixing this issue would take a lot of your time, so I would not want to ask that. However, a small change to the dependency requirements of your package would solve this issue for now. Could you update your package such that it requires |
Hmm let me look into this. I do not typically use the conda environment. What happens if you put proxy-requests as the only requirement in your requirements.txt and install into a fresh/new environment? All of the dependencies should be automatically included when it's installed. If you then do a pip freeze with the environment activated, what does it show? Sounds like there is a version mismatch for sure. |
That's more or less what I've done in this comment. By python environment I was referring to a python venv environment, not conda, sorry to using those throughout each other. For completeness, I've now created two python venv environments on my raspberry pi. In the other I first installed The two environments are identical, except for the Non-working environmentuser@rpi:~ $ python3 -m venv ~/.venv/test1
user@rpi:~ $ source ~/.venv/test1/bin/activate
(test1) user@rpi:~ $ python --version
Python 3.7.3
(test1) user@rpi:~ $ pip freeze
pkg-resources==0.0.0
(test1) user@rpi:~ $ pip install proxy-requests ...
Successfully installed certifi-2020.12.5 chardet-4.0.0 idna-2.10 proxy-requests-0.5.1 requests-2.25.1 urllib3-1.26.3
(test1) user@rpi:~ $ pip freeze
certifi==2020.12.5
chardet==4.0.0
idna==2.10
pkg-resources==0.0.0
proxy-requests==0.5.1
requests==2.25.1
urllib3==1.26.3
(test1) user@rpi:~ $ The resulting install of proxy_requests does not work, the code from proxy_requests import ProxyRequests
r = ProxyRequests('https://api.ipify.org')
r.get() results in the pool emptied error. Working environmentuser@rpi:~ $ python3 -m venv ~/.venv/test2
user@rpi:~ $ source ~/.venv/test2/bin/activate
(test2) user@rpi:~ $ python --version
Python 3.7.3
(test2) user@rpi:~ $ pip install urllib3==1.25.11
...
Successfully installed urllib3-1.25.11
(test2) user@rpi:~ $ pip install proxy-requests
...
Successfully installed certifi-2020.12.5 chardet-4.0.0 idna-2.10 proxy-requests-0.5.1 requests-2.25.1
(test2) user@rpi:~ $ pip freeze
certifi==2020.12.5
chardet==4.0.0
idna==2.10
pkg-resources==0.0.0
proxy-requests==0.5.1
requests==2.25.1
urllib3==1.25.11 The resulting install of proxy_requests works, the code from proxy_requests import ProxyRequests
r = ProxyRequests('https://api.ipify.org')
r.get()
print(r) prints the IP address of the used proxy. |
I got the exception that you mentioned. So the urllib3 is definitely causing the issue and running a |
Hmmm looks like an upstream bug report is opened: |
I may need to update a few things possibly... I can't tell just yet... let me see |
Not Working On Recent Python Version 3.9
It Do Request then reply with error
Proxy Pool Empty
and dont use no proxy no return source no json
The text was updated successfully, but these errors were encountered: