RaspberryPiFoundation / lesson_format

Lesson formatter
18 stars 28 forks source link

Autobuild: unicode filename issues #86

Closed andylolz closed 9 years ago

andylolz commented 9 years ago

More details here: andylolz/CodeClubUK-Projects#3

andylolz commented 9 years ago

@pauek @codecleaner are you guys good at solving UTF-8 issues? I’ve taken a look at this, but haven’t managed to fix it :( I know you fixed a similar issue with logging, @codecleaner…

The problem: python calls phantom.js to run on es-ES/01_scratch/01/félix_y_herbert.html (note the ‘é’); phantom.js says the file doesn’t exist. Travis reports that the PDF was not generated.

codecleaner commented 9 years ago

I think the problem is with linkchecker, not phantomjs... but I have no idea why does it happen.

andylolz commented 9 years ago

I’ve just tested locally, and it’s definitely phantomjs :( Calling fs.exists(address); shows phantom does see the file, but page.open fails. Here it is with some extra logging:

screen shot 2014-10-07 at 23 46 14

I’m very tempted to suggest we prevent filenames from containing non-ascii characters.

UPDATE: encodeURI seems to fix it! :)