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

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
NamelessNoun
Newbie
Posts: 17
Joined: Wed Feb 21, 2018 9:57 am
Contact:

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

#1 Post 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.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

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

#2 Post by PyTom »

Non-ASCII filenames aren't supported.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

NamelessNoun
Newbie
Posts: 17
Joined: Wed Feb 21, 2018 9:57 am
Contact:

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

#3 Post 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.

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

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

#4 Post 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)
Frameworks & Scriptlets:

Post Reply

Who is online

Users browsing this forum: Google [Bot]