"IOError: [Errno 22] invalid mode ('w') or filename" when downloading Special:Version

297 views
Skip to first unread message

kg

unread,
Nov 25, 2018, 10:55:13 PM11/25/18
to wikiteam-discuss
Hi,

While using dumpgenerator.py, I got this error:

Downloading Special:Version with extensions and other related info
Sleeping... 1 seconds...
Traceback (most recent call last):
  File "dumpgenerator.py", line 2323, in <module>
    main()
  File "dumpgenerator.py", line 2318, in main
    saveSpecialVersion(config=config, session=other['session'])
  File "dumpgenerator.py", line 2049, in saveSpecialVersion
    with open('%s/Special:Version.html' % (config['path']), 'w') as outfile:
IOError: [Errno 22] invalid mode ('w') or filename: 'F:\\xmldumps/Special:Version.html'

What can I do? Is there a way to fix this without having to start the dump over again?

Federico Leva (Nemo)

unread,
Nov 26, 2018, 2:37:25 AM11/26/18
to wikiteam...@googlegroups.com, kg
kg, 26/11/18 05:55:
> What can I do?

Switch to GNU/Linux.

> Is there a way to fix this without having to start the
> dump over again?

You could manually change the file paths in the code so that they follow
Windows conventions. We've never managed to test this use case.

Federico

Emilio J. Rodríguez-Posada

unread,
Nov 26, 2018, 3:48:40 AM11/26/18
to wikiteam...@googlegroups.com
Special:Version.html is the penultimate file to be downloaded, and it is of little importance. The same for siteinfo file.

Your dump should be complete, XML and images (if you chose images too). Check the directories.

About fixing the error... I never used the script on Windows, I am not sure if it is a path error or the file is corrupt and you need to deleted it, so the script can create it again without overwriting.

--
You received this message because you are subscribed to the Google Groups "wikiteam-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wikiteam-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kg

unread,
Nov 26, 2018, 8:20:27 AM11/26/18
to wikiteam-discuss
I changed line 2049 from this

        with open('%s/Special:Version.html' % (config['path']), 'w') as outfile:

to this

        with open('%s/Special - Version.html' % (config['path']), 'w') as outfile:

and now it seems to work. I guess Windows didn't like the colon.

Thank you!
Reply all
Reply to author
Forward
0 new messages