Page MenuHomePhabricator

Appveyor tests fails due to category_graph.py
Closed, ResolvedPublic

Description

Appveyor tests fails with timeout testing category_graph.py after file path validation done for T346417:
test running category_graph -simulate. ...
https://ci.appveyor.com/project/pywikibot-core/pywikibot/builds/48864190/job/8psuxm8pw0s90xnb

Current behaviour:
The command line pwb category_graph -simulate produces the following input request
Files exist for . Overwrite? ([y]es, [N]o):

Note: args and rest are
Namespace(to='', style='', depth=2, downsize=4) ['-simulate']

Btw pwb category_graph -simulate -to fails with

Traceback (most recent call last):
  File "D:\pwb\GIT\core\pwb.py", line 40, in <module>
    sys.exit(main())
             ^^^^^^
  File "D:\pwb\GIT\core\pwb.py", line 36, 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\GIT\core\pywikibot\scripts\wrapper.py", line 520, in <module>
    main()
  File "D:\pwb\GIT\core\pywikibot\scripts\wrapper.py", line 504, in main
    if not execute():
           ^^^^^^^^^
  File "D:\pwb\GIT\core\pywikibot\scripts\wrapper.py", line 491, in execute
    run_python_file(filename, script_args, module)
  File "D:\pwb\GIT\core\pywikibot\scripts\wrapper.py", line 147, in run_python_file
    exec(compile(source, filename, 'exec', dont_inherit=True),
  File "D:\pwb\GIT\core\scripts\category_graph.py", line 215, in <module>
    if glob.glob(file_path + '.*'):
                 ~~~~~~~~~~^~~~~~
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
CRITICAL: Exiting due to uncaught exception TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

What should happen instead?
Discard the input request for missing from option which is required (isn't it?)

Details

Related Changes in Gerrit:

Event Timeline

Xqt triaged this task as High priority.Jan 2 2024, 7:33 AM
Xqt updated the task description. (Show Details)
Xqt updated the task description. (Show Details)

Change 987146 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Check for 'from' option first

https://gerrit.wikimedia.org/r/987146

Xqt claimed this task.

Change 987146 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Check for 'from' option first

https://gerrit.wikimedia.org/r/987146