Page MenuHomePhabricator

TestFilePageDataItem.test_data_item_when_file_exist_but_without_item of file_tests fails
Closed, ResolvedPublicBUG REPORT

Description

======================================================================
ERROR: test_data_item_when_file_exist_but_without_item (tests.file_tests.TestFilePageDataItem)
Test if data item is missing from file.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\pywikibot\pywikibot\tests\file_tests.py", line 420, in test_data_item_when_file_exist_but_without_item
    for page in gen:
  File "D:\a\pywikibot\pywikibot\pywikibot\pagegenerators\_generators.py", line 215, in upcast
    yield pageclass(site, rc['title'])
  File "D:\a\pywikibot\pywikibot\pywikibot\page\_filepage.py", line 72, in __init__
    f'{title!r} does not have a valid extension '
ValueError: 'Route de Louhans (Frangy-en-Bresse)' does not have a valid extension (djvu, flac, gif, jpeg, jpg, mid, midi, mp3, mpeg, mpg, oga, ogg, ogv, opus, pdf, png, stl, svg, tif, tiff, wav, webm, webp, xcf).

----------------------------------------------------------------------

Event Timeline

Xqt triaged this task as High priority.Oct 4 2024, 8:30 AM
Xqt changed the subtype of this task from "Task" to "Bug Report".
Xqt moved this task from Backlog to Test failures on the Pywikibot-tests board.
Xqt renamed this task from TestFilePageDataItem.test_data_item_when_file_exist_but_without_item of file_tests fails on wikipedia:en to TestFilePageDataItem.test_data_item_when_file_exist_but_without_item of file_tests fails.Oct 4 2024, 8:33 AM
Xqt changed the task status from Open to In Progress.Oct 4 2024, 8:53 AM
Xqt claimed this task.

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

[pywikibot/core@master] [IMPR] ignore ValueError durig upcast of FilePage due to invalid file extension

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

Change #1077911 merged by jenkins-bot:

[pywikibot/core@master] [IMPR] ignore ValueError durig upcast of FilePage due to invalid file extension

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