Page MenuHomePhabricator

pywikibot.exceptions.ServerError: HTTPSConnectionPool(host='query.wikidata.org', port=443): Read timed out. (read timeout=45)
Closed, ResolvedPublic

Description

['Traceback (most recent call last):\n', '  
File "app.py", line 29, in update\n    processor.process_one_page(page_title)\n', '  
File "./pages_processor.py", line 197, in process_one_page\n    self.process_page(page)\n', '  
File "./pages_processor.py", line 125, in process_page\n    output = stats.retrieve_and_process_data()\n', '  
File "./property_statistics.py", line 236, in retrieve_and_process_data\n    groupings = self.retrieve_data()\n', '  
File "./property_statistics.py", line 261, in retrieve_data\n    groupings = self.get_grouping_information()\n', '  
File "./property_statistics.py", line 72, in get_grouping_information\n    return self.grouping_configuration.get_grouping_information(self.selector_sparql)\n', '
File "./grouping.py", line 130, in get_grouping_information\n    queryresult = sq.select(query)\n', ' 
File "/data/project/integraality/www/python/venv/lib/python3.9/site-packages/pywikibot/data/sparql.py", line 114, in select\n    data = self.query(query, headers=headers)\n', ' 
File "/data/project/integraality/www/python/venv/lib/python3.9/site-packages/pywikibot/data/sparql.py", line 158, in query\n    self.last_response = http.fetch(url, headers=headers)\n', '  
File "/data/project/integraality/www/python/venv/lib/python3.9/site-packages/pywikibot/comms/http.py", line 452, in fetch\n    callback(response)\n', '  
File "/data/project/integraality/www/python/venv/lib/python3.9/site-packages/pywikibot/comms/http.py", line 328, in error_handling_callback\n    raise ServerError(response)\n', "pywikibot.exceptions.ServerError: HTTPSConnectionPool(host='query.wikidata.org', port=443): Read timed out. (read timeout=45)\n"]

Event Timeline

Izno renamed this task from InteGraality bug to pywikibot.exceptions.ServerError: HTTPSConnectionPool(host='query.wikidata.org', port=443): Read timed out. (read timeout=45).Jan 27 2025, 11:42 PM
Izno updated the task description. (Show Details)

@Palotabarat How did this happen − doing what, on which page etc?

Hi @JeanFred !
This was the relevant page: https://www.wikidata.org/wiki/Wikidata:WikiProject_every_politician/Statistics

And this is the previous announcement

But something has happened, because for the first time this month, the politicians' stat sheet was updated this morning

If the update indicates that it has been fixed, thank you very much for your contribution!

Mentioned in SAL (#wikimedia-cloud) [2025-05-01T20:29:27Z] <wmbot~jeanfred@tools-sgebastion-10> Deploy 397c5e8 (Also catch ServerError to handle WDQS timeouts) for T384882

JeanFred claimed this task.

I’ll scope this to the problematic uncaught exception ; with 397c5e82 it should now be made clear to the user what is happening.