Page MenuHomePhabricator

generate_family_file fails to create a file for vikidia.org
Open, HighPublic

Description

C:\pwb\GIT\core>pwb generate_family_file http://en.vikidia.org vikinew
Generating family file from http://en.vikidia.org
/w
/en.vikidia.org
Traceback (most recent call last):
  File "C:\pwb\GIT\core\pwb.py", line 360, in <module>
    if not main():
  File "C:\pwb\GIT\core\pwb.py", line 352, in main
    run_python_file(filename,
  File "C:\pwb\GIT\core\pwb.py", line 73, in run_python_file
    exec(compile(source, filename, 'exec', dont_inherit=True),
  File ".\generate_family_file.py", line 220, in <module>
    main()
  File ".\generate_family_file.py", line 216, in main
    FamilyFileGenerator(*sys.argv[1:]).run()
  File ".\generate_family_file.py", line 44, in run
    w = self.Wiki(self.base_url)
  File "C:\pwb\GIT\core\pywikibot\site_detect.py", line 52, in __init__
    wp.feed(data)
  File "C:\Python38\lib\html\parser.py", line 111, in feed
    self.goahead(0)
  File "C:\Python38\lib\html\parser.py", line 171, in goahead
    k = self.parse_starttag(i)
  File "C:\Python38\lib\html\parser.py", line 343, in parse_starttag
    self.handle_startendtag(tag, attrs)
  File "C:\Python38\lib\html\parser.py", line 427, in handle_startendtag
    self.handle_starttag(tag, attrs)
  File "C:\pwb\GIT\core\pywikibot\site_detect.py", line 269, in handle_starttag
    self.set_api_url(attrs['href'])
  File "C:\pwb\GIT\core\pywikibot\site_detect.py", line 230, in set_api_url
    assert new_parsed_url.path == self._parsed_url.path
AssertionError
CRITICAL: Exiting due to uncaught exception <class 'AssertionError'>

where
new_parsed_url.path is "/w"
and self._parsed_url.path is "/en.vikidia.org"