MacOS distribution not working?

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
User avatar
Rinzamakani
Regular
Posts: 74
Joined: Wed Aug 16, 2017 3:23 pm
Completed: Love's Apathy (Ciro route), A Frigid Space, Telechronic Static
Projects: Love's Apathy (Full)
itch: rinzamakani.itch.io
Contact:

MacOS distribution not working?

#1 Post by Rinzamakani » Tue Oct 03, 2017 10:27 am

Hello! I had distributed a Mac release of the demo for my game. However, when a friend of mine downloads it and tries to save, she gets an error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00action_file.rpy", line 357, in __call__
    renpy.save(fn, extra_info=save_name)
Exception: Not saved - no valid save locations.

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

Full traceback:
  File "renpy/common/_layout/screen_load_save.rpym", line 35, in script
    $ ui.interact()
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/python.py", line 1719, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/_layout/screen_load_save.rpym", line 35, in <module>
    $ ui.interact()
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/ui.py", line 285, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/core.py", line 2526, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/core.py", line 3204, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/transition.py", line 45, in event
    return self.new_widget.event(ev, x, y, st)  # E1101
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/screen.py", line 651, in event
    rv = self.child.event(ev, x, y, st)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/layout.py", line 960, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/behavior.py", line 889, in event
    return handle_click(self.clicked)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/behavior.py", line 824, in handle_click
    rv = run(action)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/display/behavior.py", line 306, in run
    return action(*args, **kwargs)
  File "renpy/common/00action_file.rpy", line 357, in __call__
    renpy.save(fn, extra_info=save_name)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/loadsave.py", line 301, in save
    location.save(slotname, sr)
  File "/private/var/folders/yw/fttw0hsn4nl82xb3pr1p3bjc0000gn/T/AppTranslocation/09726635-F8C1-4BE5-9443-6FCE2A0AF3F6/d/Love's_Apathy_(ver.1).app/Contents/Resources/autorun/renpy/savelocation.py", line 402, in save
    raise Exception("Not saved - no valid save locations.")
Exception: Not saved - no valid save locations.

Darwin-16.7.0-x86_64-i386-64bit
Ren'Py 6.99.12.4.2187
Love's Apathy (Demo) 1.0
This works fine on my windows PC, So, I'm unsure what's happening.

I told her to delete the folder and try again. She got the same error after downloading it again. So, I figured it was a problem with the codes I used for the save/load screen. Here:

Code: Select all

##############################################################################
# Save, Load
#
# Screens that allow the user to save and load the game.
# http://www.renpy.org/doc/html/screen_special.html#save
# http://www.renpy.org/doc/html/screen_special.html#load

# Since saving and loading are so similar, we combine them into
# a single screen, file_picker. We then use the file_picker screen
# from simple load and save screens.

screen load_save_slot:
    $ file_text = "% s\n  %s" % (FileTime(number, empty="Empty Slot"), FileSaveName(number))
    add FileScreenshot(number) xpos -1 ypos 0
    text file_text xpos 11 ypos -24 size 15  color "#000000"
 
screen load:
    
    tag menu
    
    imagemap:
        ground 'saveload_idle.png'
        idle 'saveload_idle.png'
        hover 'saveload_hover.png'
        cache False
        
        hotspot (914, 38, 97, 99) action FilePage(1) 
        hotspot (1029, 37, 98, 98) action FilePage(2)
        hotspot (1148, 38, 95, 99) action FilePage(3)
        
        ## You might get confused but these one below are the save/load slots, those boxes.
        hotspot (326, 47, 464, 294) action FileAction(1):
            use load_save_slot(number=1)
        hotspot (549, 374, 463, 293) action FileAction(2):
            use load_save_slot(number=2)

        
        hotspot (86, 366, 204, 48) action ShowMenu('preferences')
        hotspot (123, 416, 132, 42) action ShowMenu('load')
        hotspot (123, 465, 126, 45) action ShowMenu('save')
        hotspot (59, 564, 250, 47) action MainMenu()
        hotspot (126, 618, 121, 46) action Quit()
        hotspot (98, 665, 173, 45) action Return()
        
        
        
screen save:
    
    tag menu
    
    imagemap:
        ground 'saveload_idle.png'
        idle 'saveload_idle.png'
        hover 'saveload_hover.png'
        cache False
        
        hotspot (914, 38, 97, 99) action FilePage(1) 
        hotspot (1029, 37, 98, 98) action FilePage(2)
        hotspot (1148, 38, 95, 99) action FilePage(3)
        
        ## You might get confused but these one below are the save/load slots, those boxes.
        hotspot (326, 47, 464, 294) action FileAction(1):
            use load_save_slot(number=1)
        hotspot (549, 374, 463, 293) action FileAction(2):
            use load_save_slot(number=2)

        
        hotspot (86, 366, 204, 48) action ShowMenu('preferences')
        hotspot (123, 416, 132, 42) action ShowMenu('load')
        hotspot (123, 465, 126, 45) action ShowMenu('save')
        hotspot (59, 564, 250, 47) action MainMenu()
        hotspot (126, 618, 121, 46) action Quit()
        hotspot (98, 665, 173, 45) action Return()
                    
init python:
    config.thumbnail_width = 464
    config.thumbnail_height = 294
I can't seem to get the error when I play the demo to my game. I'm guessing something goes wrong when I build the demo in Ren'py.

And here's the link to the demo:
https://rinzamakani.itch.io/loves-apathy

User avatar
trekopedia
Regular
Posts: 25
Joined: Thu Sep 14, 2017 11:38 pm
Location: Toronto, Canada
Contact:

Re: MacOS distribution not working?

#2 Post by trekopedia » Tue Oct 03, 2017 12:01 pm

Hi. I just tried your game on my Mac and received the same error. Traceback looks identical to what you posted. Error happened as soon as I clicked on the save slot (for clarity, not when I clicked on the Save menu option, but on the save slot itself). I'm running MacOS Sierra 10.12.6.

If there is anything I can help test for you, let me know -- happy to help.

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: MacOS distribution not working?

#3 Post by PyTom » Tue Oct 03, 2017 12:21 pm

Okay, picking apart your game, it seems like config.save_directory isn't being set. Because of that, when gatekeeper path randomization is happening (which it is here), Ren'Py can't write into the app. And so it has to use the system global save directory, but since you remove the line that sets config.save_directory, it can't do that either. And hence you get this crash.

The solution is to add a line of the form:

Code: Select all

define config.save_directory = "gamename-42"
(or some other unique identifier) to options.rpy, and re-release.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Rinzamakani
Regular
Posts: 74
Joined: Wed Aug 16, 2017 3:23 pm
Completed: Love's Apathy (Ciro route), A Frigid Space, Telechronic Static
Projects: Love's Apathy (Full)
itch: rinzamakani.itch.io
Contact:

Re: MacOS distribution not working?

#4 Post by Rinzamakani » Tue Oct 03, 2017 1:46 pm

PyTom wrote:
Tue Oct 03, 2017 12:21 pm
Okay, picking apart your game, it seems like config.save_directory isn't being set. Because of that, when gatekeeper path randomization is happening (which it is here), Ren'Py can't write into the app. And so it has to use the system global save directory, but since you remove the line that sets config.save_directory, it can't do that either. And hence you get this crash.

The solution is to add a line of the form:

Code: Select all

define config.save_directory = "gamename-42"
(or some other unique identifier) to options.rpy, and re-release.
I get an error when I start up the game after adding that code:

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/options.rpy", line 382: invalid syntax
    define config.save_directory = "gamename-42"
                 ^
    

Ren'Py Version: Ren'Py 6.99.12.4.2187
Tried putting define config.save_directory = "LovesApathy-1" but that also failed.

EDIT: Think I got it working now. Thanks. :D
Last edited by Rinzamakani on Tue Oct 03, 2017 2:02 pm, edited 1 time in total.

User avatar
Rinzamakani
Regular
Posts: 74
Joined: Wed Aug 16, 2017 3:23 pm
Completed: Love's Apathy (Ciro route), A Frigid Space, Telechronic Static
Projects: Love's Apathy (Full)
itch: rinzamakani.itch.io
Contact:

Re: MacOS distribution not working?

#5 Post by Rinzamakani » Tue Oct 03, 2017 1:48 pm

trekopedia wrote:
Tue Oct 03, 2017 12:01 pm
Hi. I just tried your game on my Mac and received the same error. Traceback looks identical to what you posted. Error happened as soon as I clicked on the save slot (for clarity, not when I clicked on the Save menu option, but on the save slot itself). I'm running MacOS Sierra 10.12.6.

If there is anything I can help test for you, let me know -- happy to help.
Thanks for testing it out. Might need your help again to test the save screen again. :(

Mind testing it out now? Re-uploaded.

User avatar
trekopedia
Regular
Posts: 25
Joined: Thu Sep 14, 2017 11:38 pm
Location: Toronto, Canada
Contact:

Re: MacOS distribution not working?

#6 Post by trekopedia » Tue Oct 03, 2017 10:38 pm

The version number on the app (download file) wasn't updated but the issue seems to be resolved. I tested saving to different slots and also tried loading; both worked fine.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]