Ren'Py Issue Saving in Ren'py Games in Sandboxie

Mal3

Newbie
Jan 31, 2019
35
6
I use sandboxie as a way to keep the games from here compartmentalized and separate from the rest of the stuff on my computer (I know VMs are better but I can't find any that work on ARM64). Most of the games from here work but Ren'py games seem to be unable to make saves and save any settings changes. I have tested different Ren'py games inside and outside the sandbox and got the same results. The games outside the sandbox work perfectly fine, but the ones inside are not able to save. The games make the folders to put the saves in but the save files are not made, just empty folders. Does anyone here know of a fix, besides the obvious "just don't run it in a sandbox"? I've pasted the error message that I get when trying to save below, it's from the game Influencing but other Ren'py games have the same message. Thank you for any help!
Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00action_file.rpy", line 383, in __call__
    renpy.save(fn, extra_info=save_name)
IOError: [Errno 2] No such file or directory: 'C:\\Users\\MYUSERNAME\\AppData\\Roaming/RenPy/Influencing\\1-1-LT1.save'

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

Full traceback:
  File "renpy/common/_layout/screen_load_save.rpym", line 35, in script
    $ ui.interact()
  File "renpy/ast.py", line 1131, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "renpy/python.py", line 1061, in py_exec_bytecode
    exec(bytecode, globals, locals)
  File "renpy/common/_layout/screen_load_save.rpym", line 35, in <module>
    $ ui.interact()
  File "renpy/ui.py", line 299, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "renpy/display/core.py", line 3377, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
  File "renpy/display/core.py", line 4258, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "renpy/display/layout.py", line 1175, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "renpy/display/transition.py", line 53, in event
    return self.new_widget.event(ev, x, y, st) # E1101
  File "renpy/display/layout.py", line 1175, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "renpy/display/layout.py", line 1175, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "renpy/display/screen.py", line 743, in event
    rv = self.child.event(ev, x, y, st)
  File "renpy/display/layout.py", line 1175, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "renpy/display/layout.py", line 1399, in event
    rv = super(Window, self).event(ev, x, y, st)
  File "renpy/display/layout.py", line 279, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "renpy/display/layout.py", line 1175, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "renpy/display/layout.py", line 1399, in event
    rv = super(Window, self).event(ev, x, y, st)
  File "renpy/display/layout.py", line 279, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "renpy/display/layout.py", line 1175, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "renpy/display/layout.py", line 279, in event
    rv = d.event(ev, x - xo, y - yo, st)
  File "renpy/display/behavior.py", line 1073, in event
    return handle_click(self.clicked)
  File "renpy/display/behavior.py", line 1008, in handle_click
    rv = run(action)
  File "renpy/display/behavior.py", line 329, in run
    return action(*args, **kwargs)
  File "renpy/common/00action_file.rpy", line 383, in __call__
    renpy.save(fn, extra_info=save_name)
  File "renpy/loadsave.py", line 423, in save
    location.save(slotname, sr)
  File "renpy/savelocation.py", line 429, in save
    l.save(slotname, record)
  File "renpy/savelocation.py", line 163, in save
    record.write_file(filename)
  File "renpy/loadsave.py", line 329, in write_file
    shutil.copyfile(self.first_filename, filename_new)
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/shutil.py", line 96, in copyfile
IOError: [Errno 2] No such file or directory: 'C:\\Users\\MYUSERNAME\\AppData\\Roaming/RenPy/Influencing\\1-1-LT1.save'

Windows-10-10.0.22621 AMD64
Ren'Py 7.5.3.22090809
Influencing 0.1.15.0
Sun Dec  3 11:41:10 2023
 

forbidden101v

The Hentai Witcher
Modder
Jun 2, 2018
802
7,426
Install Hyper-V as the other option I can think of would modifying the games save directory which would be far more annoying. Here's a guide on how to do it on Windows arm.
 

Meushi

Well-Known Member
Aug 4, 2017
1,146
12,751
The games make the folders to put the saves in but the save files are not made, just empty folders. Does anyone here know of a fix, besides the obvious "just don't run it in a sandbox"?
I don't know anything about sandboxie, but the tutorial thread might be a good place to look/ask.
 
  • Like
Reactions: forbidden101v

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,958
16,192
The games outside the sandbox work perfectly fine, but the ones inside are not able to save. The games make the folders to put the saves in but the save files are not made, just empty folders.
Hmm, just tried and it works fine for me. Sandboxied Ren'Py games save and load without problem, including with the version 7.5.3 that is used by the game you shown the traceback.
 

Mal3

Newbie
Jan 31, 2019
35
6
Hmm, just tried and it works fine for me. Sandboxied Ren'Py games save and load without problem, including with the version 7.5.3 that is used by the game you shown the traceback.
What settings did you use to set up the sandbox? It's likely I set mine up wrong somehow.
edit: I tried a new sandbox with all default settings and still had the same issue.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,958
16,192
What settings did you use to set up the sandbox?
I used a secondary sandbox dedicated for pure testing and that have the default configuration.
Must be noted that, while sandboxie is normally up to date, I use it since more than 5 years, so the said default configuration can have changed when it passed pure OpenSource.