aancw / Belati

The Traditional Swiss Army Knife for OSINT
GNU General Public License v2.0
527 stars 120 forks source link

fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached #29

Closed hellochunqiu closed 6 years ago

hellochunqiu commented 6 years ago

Please provide the following details.

Host System

Error Description

Please provide the details of the error. Try to provide the output and also steps to reproduce if required.

hello,I encountered such a problem with "virtualenv": source belati/bin/activate pip install -r requirements.txt python Belati.py

Traceback (most recent call last): File "Belati.py", line 38, in from plugins.banner_grab import BannerGrab File "/Belati/plugins/banner_grab.py", line 24, in from url_request import URLRequest File "/Belati/plugins/url_request.py", line 26, in from user_agents import UserAgents File "/Belati/plugins/user_agents.py", line 25, in ua = UserAgent() File "/Belati/belati/local/lib/python2.7/site-packages/fake_useragent/fake.py", line 69, in init self.load() File "/Belati/belati/local/lib/python2.7/site-packages/fake_useragent/fake.py", line 78, in load verify_ssl=self.verify_ssl, File "/Belati/belati/local/lib/python2.7/site-packages/fake_useragent/utils.py", line 252, in load_cached update(path, use_cache_server=use_cache_server, verify_ssl=verify_ssl) File "/Belati/belati/local/lib/python2.7/site-packages/fake_useragent/utils.py", line 247, in update write(path, load(use_cache_server=use_cache_server, verify_ssl=verify_ssl)) File "/Belati/belati/local/lib/python2.7/site-packages/fake_useragent/utils.py", line 189, in load verify_ssl=verify_ssl, File "/Belati/belati/local/lib/python2.7/site-packages/fake_useragent/utils.py", line 84, in get raise FakeUserAgentError('Maximum amount of retries reached') fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached

I tried some methods, but I didn't succeed.

@aancw @Chan9390 @ElectricCaffeine

aancw commented 6 years ago

Just try again and see if that fixed the problem. Maximum amount of retries reached

hellochunqiu commented 6 years ago

No. the same result, should I delete "virtualenv"? From the new arrangement

aancw commented 6 years ago

Reference to this issue https://github.com/hellysmile/fake-useragent/issues/53 Make sure you have openssl and no ssl problem as mentioned on that issue.

hellochunqiu commented 6 years ago

ImportError: cannot import name UserAgent

hellochunqiu commented 6 years ago

I already have "pip install useragent"

WichitaLifeICT commented 6 years ago

@aancw @hellysmile which file do you address the ssl certs in?

‘’’python from fake_useragent import UserAgent ua = UserAgent(verify_ssl=False) ‘’’

aancw commented 6 years ago

Maybe this problem occurred because i'm not using verify_ssl=False

hellochunqiu commented 6 years ago

Yes, you are right. My problem is that he will automatically upgrade to "pip-10" after using "virtualenv". It is wrong and incompatible. By breaking the net to work in "pip-9", these problems can be solved, thank you.

aancw commented 6 years ago

But, if you are using verify_ssl=false at user_agents.py, it still not working?

hellochunqiu commented 6 years ago

Did you install "Libcurl14-openssl-dev" when installing dependency?

aancw commented 6 years ago

I'm using ArchLinux btw

hellochunqiu commented 6 years ago

OK, the problem is solved. This is caused by the problem of dependence and the latest environmental problems of "Python". To install dependencies and reduce versions, "pip10" is not compatible.

At the same time, I think many beginners do not understand "dependence", but grow up in solving problems.

Fortunately, there are "Google" and "you" and "everyone".

hellochunqiu commented 6 years ago

And happy to know you

aancw commented 6 years ago

Happy to know you too. If you have any question, feel free to open issue. Pull request is welcome ❤️

hellochunqiu commented 6 years ago

Thank you

ryanbrewster124 commented 6 years ago

has anyone found a solution to this?? fake_useragent.errors.FakeUserAgentError: Maximum amount of retries

ryanbrewster124 commented 6 years ago

ok this fixed it for me: pip install fake-useragent --upgrade

hellysmile commented 6 years ago

hey there, pip install -U fake-useragent should fix issue

aancw commented 6 years ago

@ryanbrewster124 If you encounter this problem again, please be patient to wait for queue. I think fakeuseragent limiting request from per IP.

impankajnegi commented 4 years ago

Please check if u have a fast internet

Foreveri02 commented 1 year ago

hey there, pip install -U fake-useragent should fix issue

thanks bro