99moorem / wikiteam

Automatically exported from code.google.com/p/wikiteam
0 stars 0 forks source link

dumpgenerator.py crashes if image filename contains illegal characters #73

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Found an issue because I'm running r866 on a Windows machine and because the 
"?" on

http://mamedev.emulab.it/undumped/index.php?title=File:Jinglebell(global?).jpg

Checking api.php... http://mamedev.emulab.it/undumped/api.php
api.php is OK
Checking index.php... http://mamedev.emulab.it/undumped/index.php
index.php is OK
Analysing http://mamedev.emulab.it/undumped/api.php
Loading config file...
Resuming previous dump process...
Domain is mamedevemulabit_undumped
Title list was completed in the previous session
Domain is mamedevemulabit_undumped
XML dump was completed in the previous session
Domain is mamedevemulabit_undumped
Image list was completed in the previous session
1436 images were found in the directory from a previous session
Retrieving images from "Jigsaw Paradise.jpg"
Traceback (most recent call last):
  File "C:\Luiz Augusto\wikiteam\dumpgenerator.py", line 1205, in <module>
    main()
  File "C:\Luiz Augusto\wikiteam\dumpgenerator.py", line 1196, in main
    resumePreviousDump(config=config, other=other)
  File "C:\Luiz Augusto\wikiteam\dumpgenerator.py", line 1112, in resumePrevious
Dump
    generateImageDump(config=config, other=other, images=images, start=lastfilen
ame2) # we resume from previous image, which may be corrupted (or missing .desc)
  by the previous session ctrl-c or abort
  File "C:\Luiz Augusto\wikiteam\dumpgenerator.py", line 673, in generateImageDu
mp
    urllib.urlretrieve(url=url, filename='%s/%s' % (imagepath, filename2) )
  File "C:\Python27\lib\urllib.py", line 94, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "C:\Python27\lib\urllib.py", line 244, in retrieve
    tfp = open(filename, 'wb')
IOError: [Errno 22] invalid mode ('wb') or filename: './mamedevemulabit_undumped
-20131110-wikidump/images/Jinglebell(global?).jpg'

Original issue reported on code.google.com by lugu...@gmail.com on 11 Nov 2013 at 3:37

GoogleCodeExporter commented 8 years ago
AFAIK this problem doesn't exist in GNU/Linux.

Original comment by nemow...@gmail.com on 12 Nov 2013 at 7:45

GoogleCodeExporter commented 8 years ago
This has happened to me 4 times today, with 3 of them the same message as 
above. The one that was different (but still an IOError: Errno 22)
Traceback (most recent call last):
  File "dumpgenerator.py", line 1220, in <module>
    main()
  File "dumpgenerator.py", line 1213, in main
    createNewDump(config=config, other=other)
  File "dumpgenerator.py", line 1018, in createNewDump
    generateImageDump(config=config, other=other, images=images)
  File "dumpgenerator.py", line 673, in generateImageDump
    urllib.urlretrieve(url=url, filename='%s/%s' % (imagepath, filename2) )
  File "C:\Python27\lib\urllib.py", line 94, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "C:\Python27\lib\urllib.py", line 244, in retrieve
    tfp = open(filename, 'wb')
IOError: [Errno 22] invalid mode ('wb') or filename: 
'./frbatmanwikiacom-20140127-wikidump/images/The Dark Knight Soundtrack - 01 
Why So Serious?'

I am running windows 7.

Original comment by joehow...@gmail.com on 27 Jan 2014 at 7:35

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by nemow...@gmail.com on 31 Jan 2014 at 3:28

GoogleCodeExporter commented 8 years ago

Original comment by nemow...@gmail.com on 31 Jan 2014 at 3:29

GoogleCodeExporter commented 8 years ago
Any way to bypass this problem?

Original comment by perkasab...@gmail.com on 1 Oct 2014 at 5:02