IOError: [Errno 22] invalid mode ('rb') or filename ~~ Please help!

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
jypgames
Newbie
Posts: 3
Joined: Fri Feb 26, 2021 9:56 am
Contact:

IOError: [Errno 22] invalid mode ('rb') or filename ~~ Please help!

#1 Post by jypgames » Fri Feb 26, 2021 10:14 am

Hey guys, first time here. Hope you're all having a swell day! I recently encountered a problem trying to build distributions for my game. This has never happened before since updating to Ren'py 7.4.2. From digging through the forums, this issue appears to be a naming problem. However, I just can't figure out what it is! Can anyone please help! The error is:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/distribute.rpy", line 1564, in <module>
  File "game/distribute.rpy", line 1571, in _execute_python_hide
  File "game/distribute.rpy", line 563, in __init__
  File "game/distribute.rpy", line 1293, in make_package
  File "game/distribute.rpy", line 345, 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: "E:\\Project Ren'py\\renpy-7.4.2-sdk\\tmp\\Scarlet Law\\ScarletLaw-32.exe"

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

Full traceback:
  File "launcher/game/distribute.rpyc", line 1564, in script
  File "renpy/ast.py", line 922, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 2218, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "game/distribute.rpy", line 1564, in <module>
  File "game/distribute.rpy", line 1571, in _execute_python_hide
  File "game/distribute.rpy", line 563, in __init__
  File "game/distribute.rpy", line 1293, in make_package
  File "game/distribute.rpy", line 345, in hash
  File "game/distribute.rpy", line 193, in hash
  File "game/distribute.rpy", line 122, in hash_file
  File "renpy/compat/__init__.py", line 92, in compat_open
    return python_open(*args, **kwargs)
IOError: [Errno 22] invalid mode ('rb') or filename: "E:\\Project Ren'py\\renpy-7.4.2-sdk\\tmp\\Scarlet Law\\ScarletLaw-32.exe"

Windows-10-10.0.18362
Ren'Py 7.4.2.1292
Ren'Py Launcher 7.4.2.1292
Fri Feb 26 09:09:56 2021

jypgames
Newbie
Posts: 3
Joined: Fri Feb 26, 2021 9:56 am
Contact:

Re: IOError: [Errno 22] invalid mode ('rb') or filename ~~ Please help!

#2 Post by jypgames » Fri Feb 26, 2021 12:13 pm

I just did a test and I'm able to generate a distribution for MAC but not Win/Lin. Not quite sure what the problem is...

jypgames
Newbie
Posts: 3
Joined: Fri Feb 26, 2021 9:56 am
Contact:

Re: IOError: [Errno 22] invalid mode ('rb') or filename ~~ Please help!

#3 Post by jypgames » Fri Feb 26, 2021 7:07 pm

I found the issue (I think). I deleted some files and now its good.

User avatar
_ticlock_
Veteran
Posts: 323
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: IOError: [Errno 22] invalid mode ('rb') or filename ~~ Please help!

#4 Post by _ticlock_ » Fri Feb 26, 2021 8:59 pm

jypgames wrote:
Fri Feb 26, 2021 10:14 am
Hey guys, first time here. Hope you're all having a swell day! I recently encountered a problem trying to build distributions for my game. This has never happened before since updating to Ren'py 7.4.2. From digging through the forums, this issue appears to be a naming problem. However, I just can't figure out what it is! Can anyone please help! The error is:
Please, address the questions regarding RenPy coding/bugs/etc. to Ren'Py Questions and Announcements forum. You will get the answer faster and avoid spaming other forums.

Post Reply

Who is online

Users browsing this forum: Google [Bot], rayminator