Save and Load error after updating to 7.2

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
Letitia_L
Regular
Posts: 84
Joined: Wed Apr 20, 2016 4:33 am
Projects: Up until the end
IRC Nick: Letitia
Tumblr: letigame
Deviantart: LetitiaLambrechts
itch: https://letigame.itc
Contact:

Save and Load error after updating to 7.2

#1 Post by Letitia_L »

Hi, I just updated ren'py and now when I want to save or load the game I have an error.
Any idea how to fix this ? :s

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00gamemenu.rpy", line 173, in script
    $ ui.interact()
  File "renpy/common/00gamemenu.rpy", line 173, in <module>
    $ ui.interact()
  File "game/screens.rpy", line 309, in execute
    screen save():
  File "game/screens.rpy", line 309, in execute
    screen save():
  File "game/screens.rpy", line 318, in execute
    imagemap:
  File "game/screens.rpy", line 335, in execute
    hotspot (201,133,233,232) clicked FileSave(1):
  File "game/screens.rpy", line 336, in execute
    use load_save_slot(number=1)
Exception: Unknown keyword arguments: number

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

Full traceback:
  File "renpy/common/00gamemenu.rpy", line 173, in script
    $ ui.interact()
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\ast.py", line 896, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\python.py", line 1929, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/00gamemenu.rpy", line 173, in <module>
    $ ui.interact()
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\ui.py", line 289, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\display\core.py", line 2687, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\display\core.py", line 3071, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\display\core.py", line 531, in visit_all
    d.visit_all(callback, seen)
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\display\core.py", line 531, in visit_all
    d.visit_all(callback, seen)
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\display\core.py", line 531, in visit_all
    d.visit_all(callback, seen)
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\display\screen.py", line 424, in visit_all
    callback(self)
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\display\core.py", line 3071, in <lambda>
    root_widget.visit_all(lambda i : i.per_interact())
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\display\screen.py", line 434, in per_interact
    self.update()
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\display\screen.py", line 619, in update
    self.screen.function(**self.scope)
  File "game/screens.rpy", line 309, in execute
    screen save():
  File "game/screens.rpy", line 309, in execute
    screen save():
  File "game/screens.rpy", line 318, in execute
    imagemap:
  File "game/screens.rpy", line 335, in execute
    hotspot (201,133,233,232) clicked FileSave(1):
  File "game/screens.rpy", line 336, in execute
    use load_save_slot(number=1)
  File "D:\Projets\Visual_Novel_Projet\Visual_Novel_Games\renpy-6.99.9-sdk\renpy\ast.py", line 145, in apply
    raise Exception("Unknown keyword arguments: %s" % ( ", ".join(values.keys())))
Exception: Unknown keyword arguments: number

Windows-8-6.2.9200
Ren'Py 7.2.0.424
Up_until_the_end 1.1
Tue Mar 05 19:36:48 2019
Thanks a lot in advance
Létitia
WIP project
Image
Completed project
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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: Save and Load error after updating to 7.2

#2 Post by PyTom »

Can I see your load_save_Slot screen in screens.rpy? It may be that Ren'Py is enforcing something it hasn't before.
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

User avatar
Letitia_L
Regular
Posts: 84
Joined: Wed Apr 20, 2016 4:33 am
Projects: Up until the end
IRC Nick: Letitia
Tumblr: letigame
Deviantart: LetitiaLambrechts
itch: https://letigame.itc
Contact:

Re: Save and Load error after updating to 7.2

#3 Post by Letitia_L »

Thank you for your fast answer :)
Of course, here's the code. If you need anything else to find out what's wrong tell me.

Code: Select all

screen load_save_slot():
    $ file_text = "% 2s. %s\n%s" % (
                        FileSlotName(number, 4),
                        FileTime(number, empty=_("Empty Slot")),
                        FileSaveName(number))

    add FileScreenshot(number) xpos 9 ypos 55
    text file_text xpos 10 ypos 200 size 10 color "#ffffff" outlines [ (2, "#302B54") ] kerning 2 #font "FONT FILE NAME HERE"
    
    key "save_delete" action FileDelete(number)
    
init -2 python:
    
    config.thumbnail_width =  218
    config.thumbnail_height = 139
And here's the screen save and load where the load_save_slot is used just in case

Code: Select all

screen save():
    add "UI/save_load_screen.png"

    # This ensures that any other menu screen is replaced.
    tag menu

    #use navigation
    #use file_picker
    
    imagemap:
        ground "UI/save_screen_idle.png"
        idle "UI/save_screen_idle.png"
        hover "UI/save_screen_hover.png"
        cache False
     
        hotspot (1222,292,58,38) clicked FilePage(1) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1222,332,58,36) clicked FilePage(2) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1227,370,53,37) clicked FilePage(3) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1229,407,51,38) clicked FilePage(4) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1229,445,51,37) clicked FilePage(5) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1229,484,51,40) clicked FilePage(6) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1230,524,50,38) clicked FilePage(7) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1230,564,50,35) clicked FilePage(8) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1230,600,50,38) clicked FilePage(9) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        
    
        hotspot (201,133,233,232) clicked FileSave(1):
            use load_save_slot(number=1)
        hotspot (566,133,233,231) clicked FileSave(2):
            use load_save_slot(number=2)# activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (894,133,233,236) clicked FileSave(3):
            use load_save_slot(number=3)# activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (198,386,240,236) clicked FileSave(4):
            use load_save_slot(number=4)# activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (566,386,240,236) clicked FileSave(5):
            use load_save_slot(number=5)# activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (893,386,240,236) clicked FileSave(6):
            use load_save_slot(number=6)# activate_sound "bip.mp3" hover_sound "bip.mp3"

        hotspot (1169,647,111,37) action Return() #activate_sound "bip.mp3" hover_sound "bip.mp3"
    

        imagebutton auto "UI/savemenu_%s.png"  xpos 0 ypos 216 focus_mask True action ShowMenu('save')
        imagebutton auto "UI/loadmenu_%s.png"  xpos 0 ypos 272 focus_mask True action ShowMenu('load')

        imagebutton auto "UI/helpmenu_%s.png"  xpos 0 ypos 333 focus_mask True action ShowMenu('HelpMenu')
        imagebutton auto "UI/prefsmenu_%s.png"  xpos 0 ypos 395 focus_mask True action ShowMenu('preferences')
        imagebutton auto "UI/titlemenu_%s.png"  xpos 0 ypos 452 focus_mask True action MainMenu()    
    

screen load():

    add "UI/save_load_screen.png"
    if main_menu:
        add "UI/save_load_screen_main.jpg"

    # This ensures that any other menu screen is replaced.
    tag menu

    #use navigation
    #use file_picker
    
    imagemap:
        ground "UI/load_screen_idle.png"
        idle "UI/load_screen_idle.png"
        hover "UI/load_screen_hover.png"
        cache False
     
        hotspot (1222,292,58,38) clicked FilePage(1) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1222,332,58,36) clicked FilePage(2) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1227,370,53,37) clicked FilePage(3) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1229,407,51,38) clicked FilePage(4) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1229,445,51,37) clicked FilePage(5) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1229,484,51,40) clicked FilePage(6) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1230,524,50,38) clicked FilePage(7) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1230,564,50,35) clicked FilePage(8) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (1230,600,50,38) clicked FilePage(9) #activate_sound "bip.mp3" hover_sound "bip.mp3"
        
    
        hotspot (201,132,233,232) clicked FileLoad(1):
            use load_save_slot(number=1)
        hotspot (566,133,232,231) clicked FileLoad(2):
            use load_save_slot(number=2)# activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (894,133,233,232) clicked FileLoad(3):
            use load_save_slot(number=3)# activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (198,385,239,232) clicked FileLoad(4):
            use load_save_slot(number=4)# activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (566,386,240,231) clicked FileLoad(5):
            use load_save_slot(number=5)# activate_sound "bip.mp3" hover_sound "bip.mp3"
        hotspot (893,385,238,236) clicked FileLoad(6):
            use load_save_slot(number=6)# activate_sound "bip.mp3" hover_sound "bip.mp3"

        hotspot (1169,647,111,37) action Return() #activate_sound "bip.mp3" hover_sound "bip.mp3"
        

        imagebutton auto "UI/savemenu_%s.png"  xpos 0 ypos 216 focus_mask True action ShowMenu('save')
        imagebutton auto "UI/loadmenu_%s.png"  xpos 0 ypos 272 focus_mask True action ShowMenu('load')

        imagebutton auto "UI/helpmenu_%s.png"  xpos 0 ypos 333 focus_mask True action ShowMenu('HelpMenu')
        imagebutton auto "UI/prefsmenu_%s.png"  xpos 0 ypos 395 focus_mask True action ShowMenu('preferences')
        imagebutton auto "UI/titlemenu_%s.png"  xpos 0 ypos 452 focus_mask True action MainMenu()
Thank you again :)
WIP project
Image
Completed project
Image

User avatar
Letitia_L
Regular
Posts: 84
Joined: Wed Apr 20, 2016 4:33 am
Projects: Up until the end
IRC Nick: Letitia
Tumblr: letigame
Deviantart: LetitiaLambrechts
itch: https://letigame.itc
Contact:

Re: Save and Load error after updating to 7.2

#4 Post by Letitia_L »

I tried to update to the 7.2.1 in case, but I still have the problem.
Does anyone has an idea? :(
WIP project
Image
Completed project
Image

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Save and Load error after updating to 7.2

#5 Post by Zetsubou »

The problem seems to be that your screen doesn't actually have a parameter of "number".

ie. You're trying to pass it in by calling

Code: Select all

use load_save_slot(number=1)
But load_save_slot screen itself is defined as

Code: Select all

screen load_save_slot():
You need to define the parameter, so the screen knows to expect it. Otherwise it can't use it.
eg. Change that screen definition to:

Code: Select all

screen load_save_slot(number=1):
That would a) tell it to expect a parameter, b) call the parameter "number", and c) default that number to 1 if it isn't passed in.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
Letitia_L
Regular
Posts: 84
Joined: Wed Apr 20, 2016 4:33 am
Projects: Up until the end
IRC Nick: Letitia
Tumblr: letigame
Deviantart: LetitiaLambrechts
itch: https://letigame.itc
Contact:

Re: Save and Load error after updating to 7.2

#6 Post by Letitia_L »

Thank you so much Zetsubou, you're saving me!
I changed the screen definition to :

Code: Select all

screen load_save_slot(number=1):
And it seems to be working :D

Thank you very much again, it was stressing me out :)
WIP project
Image
Completed project
Image

Post Reply

Who is online

Users browsing this forum: Google [Bot]