HomePhabricator

Catch all exceptions in pages_processor.process_all

Tags
None
Referenced Files
None
Subscribers
None

Description

Catch all exceptions in pages_processor.process_all

Currently, an unforeseen exception during the processing of a page
bubbles up all the way to process_all where it is not caught [1],
crashing the bot and preventing the processing of the rest of the pages.

This catches the bare Exception in process_all,
logging the issue for further investigation.

[1] For example:

Traceback (most recent call last):
  File "pages_processor.py", line 139, in <module>
    main()
  File "pages_processor.py", line 135, in main
    processor.process_all()
  File "pages_processor.py", line 118, in process_all
    self.process_page(page)
  File "pages_processor.py", line 81, in process_page
    output = stats.retrieve_and_process_data()
  File "property_statistics.py", line 205, in retrieve_and_process_data
    (groupings_counts, groupings_groupings) = self.get_grouping_information()
  File "property_statistics.py", line 74, in get_grouping_information
    for resultitem in queryresult:
TypeError: 'NoneType' object is not iterable
VERBOSE:pywiki:Dropped throttle(s).
VERBOSE:pywiki:Closing network session.
CRITICAL: Exiting due to uncaught exception <class 'TypeError'>
CRITICAL:pywiki:Exiting due to uncaught exception <class 'TypeError'>

Details

Provenance
JeanFredAuthored on Sep 19 2019, 6:22 PM
Parents
R2566:12ebc395f52a: Add direct link in footer to report a bug
Branches
Unknown
Tags
Unknown
ChangeId
None