Page 1 of 1

IOError: [Errno 22] invalid mode ('rb') or filename:

Posted: Fri Jun 29, 2018 10:51 pm
by NamelessNoun
I haven't had any problems so far building distributions and all of a sudden after creating new scenes, I keep getting this error message.


Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/distribute.rpy", line 1484, in <module>
  File "game/distribute.rpy", line 1491, in _execute_python_hide
  File "game/distribute.rpy", line 551, in __init__
  File "game/distribute.rpy", line 1222, in make_package
  File "game/distribute.rpy", line 349, in hash
  File "game/distribute.rpy", line 193, in hash
  File "game/distribute.rpy", line 122, in hash_file
IOError: [Errno 22] invalid mode ('rb') or filename: 'C:\\Users\\sam\\Downloads\\renpy-6.99.11-sdk\\Infamous8\\game\\audio\\music\\Fr\xfchlingsbl\xfcte ?????-  Sad & Beautiful Piano.mp3'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "launcher/game/distribute.rpyc", line 1484, in script
  File "C:\Users\sam\Downloads\renpy-6.99.11-sdk\renpy\ast.py", line 862, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "C:\Users\sam\Downloads\renpy-6.99.11-sdk\renpy\python.py", line 1912, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/distribute.rpy", line 1484, in <module>
  File "game/distribute.rpy", line 1491, in _execute_python_hide
  File "game/distribute.rpy", line 551, in __init__
  File "game/distribute.rpy", line 1222, in make_package
  File "game/distribute.rpy", line 349, in hash
  File "game/distribute.rpy", line 193, in hash
  File "game/distribute.rpy", line 122, in hash_file
IOError: [Errno 22] invalid mode ('rb') or filename: 'C:\\Users\\sam\\Downloads\\renpy-6.99.11-sdk\\Infamous8\\game\\audio\\music\\Fr\xfchlingsbl\xfcte ?????-  Sad & Beautiful Piano.mp3'

Windows-8-6.2.9200
Ren'Py 7.0.0.196
Ren'Py Launcher 7.0.0.196
Sat Jun 30 02:23:52 2018


I would appreciate any help. Thank you.

Re: IOError: [Errno 22] invalid mode ('rb') or filename:

Posted: Sat Jun 30, 2018 12:05 am
by PyTom
Non-ASCII filenames aren't supported.

Re: IOError: [Errno 22] invalid mode ('rb') or filename:

Posted: Mon Jul 09, 2018 9:18 am
by NamelessNoun
PyTom wrote: ↑Sat Jun 30, 2018 12:05 am Non-ASCII filenames aren't supported.
Thank you for the reply!

I'm very sorry, but I hadn't specified further...

This wasn't the name of the file to begin with and I've changed it since and the error still happens—even when I don't try to play this track and remove it from the /game folder.

I've tried updating Ren'Py and Jedit and it still comes up. The best I'd managed to do was build an earlier version and add the script files etc from the current build.

Thanks again.

Re: IOError: [Errno 22] invalid mode ('rb') or filename:

Posted: Mon Jul 09, 2018 9:39 am
by Remix
Could you list the error with the ascii named file ( suggest something very simple like "aaa.mp3" )

Note also:
I'd suggest moving your projects folder somewhere simpler too ( maybe C:/Users/sam/renpy or somesuch ) as there is a limit to the length of filenames on windows and you might end up hitting that with folders nested so deeply. Putting the Ren'Py source (the sdk bit too if you hold both ) alongside rather than inside or containing your project makes sense in my mind (as you are probably not altering the Ren'Py source you can just store that somewhere else ... I myself just use E:/renpy/renpy---sdk, E:/renpy/renpy---source and E:/renpy/projects/ ... various games here ... with the launcher set to target the projects directory)