Skip to content

Wikiteam Dump Generator fails when downloading images with "No host supplied" error #67

Description

@mattsblack

I ran wikiteam3dumpgenerator https://vicky.citrons.xyz/w/ --xml --images and it worked fine until it tried downloading an image. It crashed with a "No host supplied" error. Here is the full error log when I tried to resume the dump:

Resuming previous dump process...
XML dump was completed in the previous session
Image list was completed in the previous session
0 files in $wikidump/images/ dir, du -s: 0 bytes (0.00 GiB)
37 records in images.txt, 0 files were saved in the previous session
Estimated size of all images (images.txt): 28497513 bytes (0.03 GiB)
WARNING: Some images were not saved in the previous session
Retrieving images...
Traceback (most recent call last):
  File "/usr/local/bin/wikiteam3dumpgenerator", line 6, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/wikiteam3/dumpgenerator/__init__.py", line 4, in main
    DumpGenerator()
  File "/usr/local/lib/python3.10/dist-packages/wikiteam3/dumpgenerator/dump/generator.py", line 84, in __init__
    DumpGenerator.resumePreviousDump(config=config, other=other)
  File "/usr/local/lib/python3.10/dist-packages/wikiteam3/dumpgenerator/dump/generator.py", line 266, in resumePreviousDump
    Image.generate_image_dump(
  File "/usr/local/lib/python3.10/dist-packages/wikiteam3/dumpgenerator/dump/image/image.py", line 251, in generate_image_dump
    r = session.get(url=url, params=modify_params(), headers=modify_headers(), allow_redirects=True)
  File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 671, in get
    return self.request("GET", url, params=params, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 635, in request
    prep = self.prepare_request(req)
  File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 541, in prepare_request
    p.prepare(
  File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 439, in prepare
    self.prepare_url(url, params)
  File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 520, in prepare_url
    raise InvalidURL(f"Invalid URL {url!r}: No host supplied")
requests.exceptions.InvalidURL: Invalid URL 'https:///vicky.citrons.xyz/w/images/6/6d/%22No_smoking%22_sign_in_real.jpg': No host supplied
Undo monkey patch...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions