The server usually includes a Retry-after header in the response with the number of seconds you are supposed to wait before retrying. ![]() You have several options depending on your use-case:ġ) Sleep your process. I used time.sleep() and it works, but it seems unintelligent and unreliable, is there any other way to dodge this error?Īs MRA said, you shouldn't try to dodge a 429 Too Many Requests but instead handle it accordingly. Mechanize._response.httperror_seek_wrapper: HTTP Error 429: Unknown Response Code Return self._mech_open(url, data, timeout=timeout)įile "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 255, in _mech_open I am trying to use Python to login to a website and gather information from several webpages and I get the following error: Traceback (most recent call last):įile "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |