Wikipedia icon indicating copy to clipboard operation
Wikipedia copied to clipboard

Error: 'Search is currently too busy. Please try again later'

Open lambdamusic opened this issue 10 years ago • 15 comments

Traceback (most recent call last):
  File "matchWikipedia.py", line 60, in <module>
    raise e
  File "matchWikipedia.py", line 38, in main
    print "===Success=== ", len(t), " links found!" 
  File "/Library/Python/2.7/site-packages/wikipedia/util.py", line 28, in __call__
    ret = self._cache[key] = self.fn(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/wikipedia/wikipedia.py", line 109, in search
    raise WikipediaException(raw_results['error']['info'])
wikipedia.exceptions.WikipediaException: An unknown error occured: "Search is currently too busy.  Please try again later.". Please report it on GitHub!

I got that after ~300 requests.

I assume this has mostly to do with Wikipedia's bandwidth.. I wonder though if there's any best practice for dealing with this kind of situations..

lambdamusic avatar Jun 09 '15 18:06 lambdamusic

fyi:

I've modified my script so that requests happen every other second, but still ran into problems:

Traceback (most recent call last):
  File "matchWikipedia.py", line 59, in <module>
    main()
  File "matchWikipedia.py", line 35, in main
    t = wikipedia.search(row[2], 3000)
  File "/Library/Python/2.7/site-packages/wikipedia/util.py", line 28, in __call__
    ret = self._cache[key] = self.fn(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/wikipedia/wikipedia.py", line 103, in search
    raw_results = _wiki_request(search_params)
  File "/Library/Python/2.7/site-packages/wikipedia/wikipedia.py", line 737, in _wiki_request
    r = requests.get(API_URL, params=params, headers=headers)
  File "/Library/Python/2.7/site-packages/requests-2.3.0-py2.7.egg/requests/api.py", line 55, in get
    return request('get', url, **kwargs)
  File "/Library/Python/2.7/site-packages/requests-2.3.0-py2.7.egg/requests/api.py", line 44, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Library/Python/2.7/site-packages/requests-2.3.0-py2.7.egg/requests/sessions.py", line 456, in request
    resp = self.send(prep, **send_kwargs)
  File "/Library/Python/2.7/site-packages/requests-2.3.0-py2.7.egg/requests/sessions.py", line 559, in send
    r = adapter.send(request, **kwargs)
  File "/Library/Python/2.7/site-packages/requests-2.3.0-py2.7.egg/requests/adapters.py", line 375, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='en.wikipedia.org', port=80): Max retries exceeded with url: /w/api.php?srsearch=10.1038%2F343396a0&format=json&srlimit=3000&list=search&srprop=&limit=3000&action=query (Caused by <class 'socket.error'>: [Errno 65] No route to host)

lambdamusic avatar Jun 09 '15 21:06 lambdamusic

Hi, I have the same problem and have not exceeded 300 requests, we have also changed our ip, the machine, os, the script, and nothing, after yesterday night:

import wikipedia print wikipedia.summary("Wikipedia")

wikipedia.exceptions.WikipediaException: An unknown error occured: "Search is currently too busy. Please try again later.". Please report it on GitHub!

Maybe the service is down?

acosatom avatar Jun 15 '15 08:06 acosatom

Hi all, receiving the same error message, first wikipedia request of the day.

Aphire avatar Jun 15 '15 09:06 Aphire

I used the library without problems over the weekend, then since yesterday started getting this error again - think it's fair to assume this is caused by wikipedia's APi.

lambdamusic avatar Jun 15 '15 10:06 lambdamusic

I'm getting the same error... Has anyone contacted WikimediaFoundation yet? Maybe their API endpoint is down or refuses connections?

B0nzo93 avatar Jun 15 '15 11:06 B0nzo93

I have not, I am not sure where to post such a question, I am currently in the UK wikimedia commons IRC hoping to get their attention

Aphire avatar Jun 15 '15 11:06 Aphire

I just tried to do a search by using the wikimedia API with the endpoint of the English Wikipedia in my browser by requesting the URL: https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Albert%20Einstein This leads to the same error message, so it should be a problem with the wikimedia API itself and not with the python wrapper

EDIT: it's the same with german wikipedia: https://de.wikipedia.org/w/api.php?action=query&list=search&srsearch=Albert%20Einstein :(

B0nzo93 avatar Jun 15 '15 11:06 B0nzo93

The Wikimedia operations team are aware of the problem and working to fix it. Cheers ;-)

jayvdb avatar Jun 15 '15 12:06 jayvdb

Issue seems to be have been resolved, I am able to use the API again :)

Thanks Jayvdb

Aphire avatar Jun 15 '15 12:06 Aphire

"Search is currently too busy. Please try again later." showing up.

First time encountering it a few minute ago. Still suffering.

imoonkey avatar Jun 16 '15 04:06 imoonkey

The issue has repeated

agnedil avatar Dec 28 '19 01:12 agnedil

Same issue. Is this caused by wikipedia being bussy?

tomascufaro avatar Sep 14 '20 19:09 tomascufaro

I am also getting the issue right now. Any clue on how to solve it?

dakshisdaksh avatar Jan 19 '23 10:01 dakshisdaksh

The issue has repeated again; it's been going on for three days now.

medok-durachok avatar Apr 21 '24 09:04 medok-durachok