Page MenuHomePhabricator

Log file doesn't contain traceback when script fails by exception
Closed, ResolvedPublic

Description

2015-08-07 10:44:22        throttle.py,  140 in  checkMultiplicity: VERBOSE  Found 2 wikipedia:de processes running, including this one.
2015-08-07 10:44:51 vm-auto-erl-neu.py,  488 in                run: INFO     >> 10:44:51: 
2015-08-07 10:44:52        __init__.py,  711 in             stopme: VERBOSE  Dropped throttle(s).
2015-08-07 10:45:22 vm-auto-erl-neu.py,  488 in                run: INFO     >> 10:45:22: 
2015-08-07 10:45:22        __init__.py,  711 in             stopme: VERBOSE  Dropped throttle(s).
2015-08-07 10:45:52 vm-auto-erl-neu.py,  488 in                run: INFO     >> 10:45:52: 
2015-08-07 10:45:52      logentries.py,   36 in        __missing__: ERROR    API log entry received:
{u'comment': u'[[WP:Ungeeigneter Benutzername|Ungeeigneter Benutzername]]', u'timestamp': u'2015-08-07T08:41:27Z', u'logid': 71649459, u'user': u'NordNordWest', u'type': u'block', u'action': u'block', u'actionhidden': u'', u'suppressed': u''}
2015-08-07 10:45:52        __init__.py,  711 in             stopme: VERBOSE  Dropped throttle(s).
2015-08-07 10:45:52            http.py,   83 in             _flush: CRITICAL Closing network session.
2015-08-07 10:45:52            http.py,   87 in             _flush: VERBOSE  Network session closed.

Traceback should be written when script fails in order to fix that exception.

Event Timeline

Xqt raised the priority of this task from to Medium.
Xqt updated the task description. (Show Details)
Xqt added a project: Pywikibot.
Xqt subscribed.
Xqt raised the priority of this task from Medium to High.Jul 31 2016, 7:04 PM
Xqt added a project: Regression.

Another sample of missing traceback:

C:\pwb\SVN\core>pwb.py imagereview -simulate -check
Processing 30 images...
Retrieving 47 pages from wikipedia:de.

Ignoriere [[de:Datei:Michael Vetter (Radiosprecher).jpeg]]: Grund Antwort=Es ist
 aber eines. wird nicht bearbeitet

Building wiki table...
1
####
Traceback (most recent call last):
  File "C:\pwb\SVN\core\pwb.py", line 259, in <module>
    if not main():
  File "C:\pwb\SVN\core\pwb.py", line 255, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "C:\pwb\SVN\core\pwb.py", line 121, in run_python_file
    main_mod.__dict__)
  File ".\scripts\xqbot\imagereview.py", line 965, in <module>
    main()
  File ".\scripts\xqbot\imagereview.py", line 960, in main
    bot.run()
  File ".\scripts\xqbot\imagereview.py", line 787, in run
    self.run_check()
  File ".\scripts\xqbot\imagereview.py", line 752, in run_check
    self.build_table(True)
  File ".\scripts\xqbot\imagereview.py", line 701, in build_table
    if not unittest and self.inform_user(key, table[key]):
  File ".\scripts\xqbot\imagereview.py", line 517, in inform_user
    up = up.getRedirectTarget()
  File "C:\pwb\SVN\core\pywikibot\page.py", line 1574, in getRedirectTarget
    return self.site.getredirtarget(self)
  File "C:\pwb\SVN\core\pywikibot\site.py", line 3070, in getredirtarget
    raise InterwikiRedirectPage(page, target)
pywikibot.exceptions.InterwikiRedirectPage: Page redirects to a page on another
Site.
Page: [[de:Benutzer Diskussion:Pumbaa80~dewiki]]
Target page: [[commons:User talk:Pumbaa80/Deutsch]] on commons:commons.
<class 'pywikibot.exceptions.InterwikiRedirectPage'>
CRITICAL: Closing network session.

But there is not any hint in the log file:

2016-07-27 00:54:16        throttle.py,  252 in               wait: VERBOSE  Sleeping for 9.2 seconds, 2016-07-27 00:54:16
2016-07-27 00:54:26            page.py, 1213 in              _save: INFO     Page [[Datei:Wikipedia VB-DORSTEN Hauptstelle IMG 4300 148x70mm 02-05-2016.jpg]] saved
2016-07-27 00:54:26     imagereview.py,  696 in        build_table: INFO     Volksbank Dorsten done.
2016-07-27 00:54:27          family.py, 1213 in           from_url: VERBOSE  Found candidate commons:commons
2016-07-27 00:54:27        throttle.py,  141 in  checkMultiplicity: VERBOSE  Found 1 commons:commons processes running, including this one.
2016-07-27 00:54:27        __init__.py,  923 in             _flush: VERBOSE  Dropped throttle(s).
2016-07-27 00:54:27            http.py,   97 in             _flush: CRITICAL Closing network session.
2016-07-27 00:54:27            http.py,  101 in             _flush: VERBOSE  Network session closed.

Invalid or solved in meantime.

2023-07-22 20:00:03         logging.py,  335 in          exception: ERROR    'NoneType' object has no attribute 'group' (AttributeError)
2023-07-22 20:00:03            http.py,  119 in              flush: VERBOSE  Closing network session.
2023-07-22 20:00:03            http.py,  123 in              flush: VERBOSE  Traceback (most recent call last):
  File "D:\pwb\core\pwb.py", line 39, in <module>
    sys.exit(main())
             ^^^^^^
  File "D:\pwb\core\pwb.py", line 35, in main
    runpy.run_path(str(path), run_name='__main__')
  File "<frozen runpy>", line 291, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "D:\pwb\core\pywikibot\scripts\wrapper.py", line 513, in <module>
    main()
  File "D:\pwb\core\pywikibot\scripts\wrapper.py", line 497, in main
    if not execute():
           ^^^^^^^^^
  File "D:\pwb\core\pywikibot\scripts\wrapper.py", line 484, in execute
    run_python_file(filename, script_args, module)
  File "D:\pwb\core\pywikibot\scripts\wrapper.py", line 147, in run_python_file
    exec(compile(source, filename, 'exec', dont_inherit=True),
  File "D:\pwb\xqbot\dyk_archiver.py", line 162, in <module>
    main()
  File "D:\pwb\xqbot\dyk_archiver.py", line 158, in main
    DYKArchiverBot(**options).run()
  File "D:\pwb\core\pywikibot\bot.py", line 1671, in run
    self.treat(page)
  File "D:\pwb\xqbot\dyk_archiver.py", line 112, in treat
    pict = regex.search(text).group()
           ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
2023-07-22 20:00:03            http.py,  132 in              flush: CRITICAL Exiting due to uncaught exception AttributeError: 'NoneType' object has no attribute 'group'
2023-07-22 20:00:03            http.py,  137 in              flush: VERBOSE  Network session closed.
JJMC89 changed the task status from Invalid to Resolved.Jul 26 2023, 4:08 PM
JJMC89 claimed this task.
JJMC89 subscribed.

Done in {c684a68e068c2e2884d4cb38956d5c5c547bf02f}