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

JYPGames

Member
Game Developer
Sep 1, 2020
108
877
Hey guys,

Since updating to Ren'py 7.4.2, I've come across a problem with building the Win/Linux version of my game. This error only seems to happen when I try and build distributions for Win/Linux. There are no issues when I build the MAC distribution. Was wondering if you guys had the same issue or if you could help me out.

Code:
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_gui.rpyc", line 277, in script call
  File "launcher/game/choose_theme.rpyc", line 514, in script call
  File "launcher/game/choose_theme.rpyc", line 514, in script call
  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 11:41:54 2021
Any help would be greatly appreciated.
 

JYPGames

Member
Game Developer
Sep 1, 2020
108
877
Found the issue, I think. I deleted some files and its working again.