CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

Ren'Py With the new Renpy Update

Shawdawg

Member
Jan 10, 2018
148
157
I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/00start.rpy", line 282, in script
python:
ScriptError: could not find label 'start'.

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

Full traceback:
File "D:\renpy\OopsyDaisy-0.4.1-pc-1.0-pc\renpy\bootstrap.py", line 316, in bootstrap
renpy.main.main()
File "D:\renpy\OopsyDaisy-0.4.1-pc-1.0-pc\renpy\main.py", line 578, in main
run(restart)
File "D:\renpy\OopsyDaisy-0.4.1-pc-1.0-pc\renpy\main.py", line 143, in run
renpy.execution.run_context(True)
File "D:\renpy\OopsyDaisy-0.4.1-pc-1.0-pc\renpy\execution.py", line 908, in run_context
context.run()
File "renpy/common/00start.rpy", line 282, in script
python:
File "D:\renpy\OopsyDaisy-0.4.1-pc-1.0-pc\renpy\script.py", line 898, in lookup
raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label 'start'.

Windows-7-6.1.7601-SP1
Ren'Py 7.3.5.606

Tue Feb 02 12:31:56 2021
This is the error I get when trying to load Oopsy Daisy 0.4.1. I did Build Distribution on both windows and pc to try.
 

S.O.M.

Member
Game Developer
Jan 30, 2021
461
1,085
For first i wanted to say that this a bug from developer. But as i understand, coldarctus played it. So, this is something wrong from your side. What you do, step by step? Do you use unren? Because unren can break any games.
 

Shawdawg

Member
Jan 10, 2018
148
157
No, I didnt use Unren. I even deleted the appdata renpy folder to clear out everything. Loaded it in Renpy 7.3.5 and did Build Distribution for PC and windows x86 to try both, and when I tried to run the game, it gave me that log.
 

S.O.M.

Member
Game Developer
Jan 30, 2021
461
1,085
Well, sorry fot stupid question, but when you download original game and run exe file in game folder, is this also dont run your game? Than you wanted to try rebuild it with sdk, but because of the bigs in script, you can't do it.

Well, i searched info about this problem on lemmasoft and f95 and this problem can be only because wrong code in game. If you do nothing to the game, like adding patch, unren etc, than this is a problem from developer. Maybe you should ask him. Because im really out of ideas right now.
 
Last edited:

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,839
No, I didnt use Unren. I even deleted the appdata renpy folder to clear out everything. Loaded it in Renpy 7.3.5 and did Build Distribution for PC and windows x86 to try both, and when I tried to run the game, it gave me that log.
Well, sorry fot stupid question, but when you download original game and run exe file in game folder, is this also dont run your game? Than you wanted to try rebuild it with sdk, but because of the bigs in script, you can't do it.

Well, i searched info about this problem on lemmasoft and f95 and this problem can be only because wrong code in game. If you do nothing to the game, like adding patch, unren etc, than this is a problem from developer. Maybe you should ask him. Because im really out of ideas right now.
The workaround via Ren'Py 7.3.5 no longer works for Oopsy Daisy v0.4.1. That's why you get the above error.

Shawdawg is your Windows 7 system fully updated? Please install OpenCL Viewer and provide a screenshot or a report with shown information.

Link OpenGL Viewer: realtech-vr.com/home/glview (scroll own to find the download link)
 
  • Like
Reactions: S.O.M.

S.O.M.

Member
Game Developer
Jan 30, 2021
461
1,085
Yep, coldarctus right.
Also, please, download some of new games from "latest games and updates" and let us know if these games work fine for you, can you run them. If none of new games you can't run, so, yes, problems with your pc.
You need to install new Windows 7 with full updates (drivers, newest soft and updates). And check your gpu.
But renpy games run even on the integrated video card.
 

Shawdawg

Member
Jan 10, 2018
148
157
My issue might be that my Windows 7 isnt really "official". Got it at a time when I didnt have much money, but now that it is cheaper, could probably get it.
 

CHFan

Member
Feb 25, 2019
178
99
I'm having the same issue. ScriptError: could not find label 'start'.

I'm on a Mac trying to run a PC build through the SDK (and did not Unren). I've only had this issue with this one game, every other PC build has worked without issue. I did update the SDK when I first had this issue a month or so ago thinking that might be the issue. Posted the error for the devs and the reply was they don't support Macs (wasn't asking them to) and that my version of the SDK was higher than what they were developing under and to degrade the SDK to their version (only SDKs I found were higher). Near as I can tell no other users have reported this issue.

I've been playing around in the .rpy files, specifically 00start.rpy. I can see a 'label _start' about 100 lines above where the error message states. I can usually debug small issues but this seems to be beyond me. Any advice would be appreicated.

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00start.rpy", line 283, in script
    renpy.game.context().force_checkpoint = True
ScriptError: could not find label 'start'.

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

Full traceback:
  File "/Applications/renpy-7.3.5-sdk/renpy/bootstrap.py", line 326, in bootstrap
    renpy.main.main()
  File "/Applications/renpy-7.3.5-sdk/renpy/main.py", line 617, in main
    run(restart)
  File "/Applications/renpy-7.3.5-sdk/renpy/main.py", line 148, in run
    renpy.execution.run_context(True)
  File "/Applications/renpy-7.3.5-sdk/renpy/execution.py", line 922, in run_context
    context.run()
  File "renpy/common/00start.rpy", line 283, in script
    renpy.game.context().force_checkpoint = True
  File "/Applications/renpy-7.3.5-sdk/renpy/script.py", line 910, in lookup
    raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label 'start'.

Darwin-20.5.0-x86_64-i386-64bit
Ren'Py 7.4.5.1648
 
Wed Jul  7 13:58:53 2021
 

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,839
I'm having the same issue. ScriptError: could not find label 'start'.

I'm on a Mac trying to run a PC build through the SDK (and did not Unren). I've only had this issue with this one game, every other PC build has worked without issue. I did update the SDK when I first had this issue a month or so ago thinking that might be the issue. Posted the error for the devs and the reply was they don't support Macs (wasn't asking them to) and that my version of the SDK was higher than what they were developing under and to degrade the SDK to their version (only SDKs I found were higher). Near as I can tell no other users have reported this issue.

I've been playing around in the .rpy files, specifically 00start.rpy. I can see a 'label _start' about 100 lines above where the error message states. I can usually debug small issues but this seems to be beyond me. Any advice would be appreicated.

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00start.rpy", line 283, in script
    renpy.game.context().force_checkpoint = True
ScriptError: could not find label 'start'.

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

Full traceback:
  File "/Applications/renpy-7.3.5-sdk/renpy/bootstrap.py", line 326, in bootstrap
    renpy.main.main()
  File "/Applications/renpy-7.3.5-sdk/renpy/main.py", line 617, in main
    run(restart)
  File "/Applications/renpy-7.3.5-sdk/renpy/main.py", line 148, in run
    renpy.execution.run_context(True)
  File "/Applications/renpy-7.3.5-sdk/renpy/execution.py", line 922, in run_context
    context.run()
  File "renpy/common/00start.rpy", line 283, in script
    renpy.game.context().force_checkpoint = True
  File "/Applications/renpy-7.3.5-sdk/renpy/script.py", line 910, in lookup
    raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label 'start'.

Darwin-20.5.0-x86_64-i386-64bit
Ren'Py 7.4.5.1648

Wed Jul  7 13:58:53 2021
Which game?

Here are older versions of RenPy SDK.
 
  • Like
Reactions: CHFan and S.O.M.

S.O.M.

Member
Game Developer
Jan 30, 2021
461
1,085
I'm having the same issue. ScriptError: could not find label 'start'.

I'm on a Mac trying to run a PC build through the SDK (and did not Unren). I've only had this issue with this one game, every other PC build has worked without issue. I did update the SDK when I first had this issue a month or so ago thinking that might be the issue. Posted the error for the devs and the reply was they don't support Macs (wasn't asking them to) and that my version of the SDK was higher than what they were developing under and to degrade the SDK to their version (only SDKs I found were higher). Near as I can tell no other users have reported this issue.

I've been playing around in the .rpy files, specifically 00start.rpy. I can see a 'label _start' about 100 lines above where the error message states. I can usually debug small issues but this seems to be beyond me. Any advice would be appreicated.

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00start.rpy", line 283, in script
    renpy.game.context().force_checkpoint = True
ScriptError: could not find label 'start'.

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

Full traceback:
  File "/Applications/renpy-7.3.5-sdk/renpy/bootstrap.py", line 326, in bootstrap
    renpy.main.main()
  File "/Applications/renpy-7.3.5-sdk/renpy/main.py", line 617, in main
    run(restart)
  File "/Applications/renpy-7.3.5-sdk/renpy/main.py", line 148, in run
    renpy.execution.run_context(True)
  File "/Applications/renpy-7.3.5-sdk/renpy/execution.py", line 922, in run_context
    context.run()
  File "renpy/common/00start.rpy", line 283, in script
    renpy.game.context().force_checkpoint = True
  File "/Applications/renpy-7.3.5-sdk/renpy/script.py", line 910, in lookup
    raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label 'start'.

Darwin-20.5.0-x86_64-i386-64bit
Ren'Py 7.4.5.1648

Wed Jul  7 13:58:53 2021
The reason for the problem may be the difference between the Renpy versions.
But from my experience, I can say that the main cause of errors is that you do not have a "clean" version of the game, before creating a distribution. Not so long ago, I tried to make a new version for my game by adding an update to an already distributed game. And thanks to this, I found out that working with already compiled versions can lead to a large number of bugs. So, if you want to avoid bugs, it is advisable to have a clean version of the game (the folder that initially creates by Renpy sdk).
You can try to create "new game" in sdk. Than drag and drop files from game that you want to modify. But this method will not give guarantees in solving problems.
 
  • Like
Reactions: CHFan

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,839
The reason for the problem may be the difference between the Renpy versions.
But from my experience, I can say that the main cause of errors is that you do not have a "clean" version of the game, before creating a distribution. Not so long ago, I tried to make a new version for my game by adding an update to an already distributed game. And thanks to this, I found out that working with already compiled versions can lead to a large number of bugs. So, if you want to avoid bugs, it is advisable to have a clean version of the game (the folder that initially creates by Renpy sdk).
You can try to create "new game" in sdk. Than drag and drop files from game that you want to modify. But this method will not give guarantees in solving problems.
Sometimes you have to unren the game first and then recompile before you can build a new game.
 
  • Like
Reactions: S.O.M.

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,006
16,292
I'm on a Mac trying to run a PC build through the SDK (and did not Unren). I've only had this issue with this one game, every other PC build has worked without issue.
A quick search on the forum make me guess that you are talking about "patronus", right ?
The author use a modified version of Ren'py in order to (he believe) protect his code. Ren'py can not find the "start" label, because it can't proceed the RPA files, and so can't access to the scripts.

Find the "renpy/loader.py" file, open it and go to the line 132.
There (or really near to this line, it can depend of the version of Ren'py) you'll find this :
Code:
            # 3.0 Branch.
            if l.startswith("RPA-3.0 "):
                offset = int(l[8:24], 16)
                key = int(l[25:33], 16)
                f.seek(offset)
                index = loads(f.read().decode("zlib"))
Change it like that:
Code:
            # 3.0 Branch.
#            if l.startswith("RPA-3.0 "):
            if l.startswith("RPI-3.0 "):
                offset = int(l[8:24], 16)
#                key = int(l[25:33], 16)
                key = int(l[27:33], 16)
                f.seek(offset)
                index = loads(f.read().decode("zlib"))
And you should be able to play the game.
WARNING:
Like this particular game is incompatible with the regular version of Ren'py, this change will make this particular version of Ren'py incompatible with regular games.
It's the reason why the lines aren't changed, but commented (the "#" at start). This let you keep the original code, and so let you revert Ren'py to its normal state when you need it.


[...] that my version of the SDK was higher than what they were developing under and to degrade the SDK to their version
Ren'py downgrade compatibility have suffered recently, but not to this point. There's near to no reason for a game wrote with a previous version of Ren'py to not works with a 7.4.x. And the problem you encounter isn't one of the few possible bugs.


(only SDKs I found were higher). Near as I can tell no other users have reported this issue.
It's not needed since it's not the issue, but next time you search for a version of the SDK, look at . It's the only place where you can be sure that the files are safe.



So, if you want to avoid bugs, it is advisable to have a clean version of the game (the folder that initially creates by Renpy sdk).
What do you mean by that ? The only things present in this folder in addition of the script files and images are:
  • The cache
    But it's not part of the distribution file, and recompiled in real time if there a change.
  • The persistent file
    That contain important information regarding the game and must be kept. Anyway removing the content of the "game" folder do not remove the copy present with the second set of save files.
  • The compiled rpyc file
    That must be kept in order to keep the game consistent, especially with previously released updates. :
    The .rpyc files are important, and you should keep them around during development and ship them as part of the released game. When working on a team, one creator should start with the .rpyc files from the released game, keep them updated as the game changes, and then make the release of the new version.

The "bugs" you encountered more surely came from your development process than from Ren'py. Only a radical change in the structure of a class can effectively make a game incompatible from one release to another.

There's few thousand of Ren'py games available here. 99% of them keep all the content of the "game" folder without problems other than the usual save compatibility issues that come from the author, and solely from the author.
 

S.O.M.

Member
Game Developer
Jan 30, 2021
461
1,085
A quick search on the forum make me guess that you are talking about "patronus", right ?
The author use a modified version of Ren'py in order to (he believe) protect his code. Ren'py can not find the "start" label, because it can't proceed the RPA files, and so can't access to the scripts.

Find the "renpy/loader.py" file, open it and go to the line 132.
There (or really near to this line, it can depend of the version of Ren'py) you'll find this :
Code:
            # 3.0 Branch.
            if l.startswith("RPA-3.0 "):
                offset = int(l[8:24], 16)
                key = int(l[25:33], 16)
                f.seek(offset)
                index = loads(f.read().decode("zlib"))
Change it like that:
Code:
            # 3.0 Branch.
#            if l.startswith("RPA-3.0 "):
            if l.startswith("RPI-3.0 "):
                offset = int(l[8:24], 16)
#                key = int(l[25:33], 16)
                key = int(l[27:33], 16)
                f.seek(offset)
                index = loads(f.read().decode("zlib"))
And you should be able to play the game.
WARNING:
Like this particular game is incompatible with the regular version of Ren'py, this change will make this particular version of Ren'py incompatible with regular games.
It's the reason why the lines aren't changed, but commented (the "#" at start). This let you keep the original code, and so let you revert Ren'py to its normal state when you need it.




Ren'py downgrade compatibility have suffered recently, but not to this point. There's near to no reason for a game wrote with a previous version of Ren'py to not works with a 7.4.x. And the problem you encounter isn't one of the few possible bugs.




It's not needed since it's not the issue, but next time you search for a version of the SDK, look at . It's the only place where you can be sure that the files are safe.





What do you mean by that ? The only things present in this folder in addition of the script files and images are:
  • The cache
    But it's not part of the distribution file, and recompiled in real time if there a change.
  • The persistent file
    That contain important information regarding the game and must be kept. Anyway removing the content of the "game" folder do not remove the copy present with the second set of save files.
  • The compiled rpyc file
    That must be kept in order to keep the game consistent, especially with previously released updates. :

The "bugs" you encountered more surely came from your development process than from Ren'py. Only a radical change in the structure of a class can effectively make a game incompatible from one release to another.

There's few thousand of Ren'py games available here. 99% of them keep all the content of the "game" folder without problems other than the usual save compatibility issues that come from the author, and solely from the author.
I mean that if I made update with my game folder that I already distributed it can lead to the bugs, like variables, missed pictures, developer console. But this is just my experience. Maybe I made something wrong. But I asked some people and they agreed with me about clean version. So now I create updates only in folder that wasn't distributed. Just my opinion.
 

CHFan

Member
Feb 25, 2019
178
99
Thanks for the replies cold_arctus anne O'nymous S.O.M.

At this point it's not about playing the game, I've spent a month (off and on) trying to figure out this error. Now it's seeing if I can bend Ren'py to my will. I'm not the most skilled coder (best I've done is create a little hangman game) so I'm using this as a learning experience.

I did try two of the above suggestions. I edited the loader.py file and got the same issue but I'm pretty sure I edited that file from the Patronus game and not the SDK. I'll need to go back and verify that later today when I have some time to devote to it. I also downloaded the SDK version the dev recommended (thanks for that link!) but ran into a completely different error, something about not finding a 'scripts2.rpi' file. Again, something to delve into later today when I have the time.

Anyway, thanks again for the advice. You've helped me gain a deeper understanding of how these various gears intermesh with one another.
 
  • Like
Reactions: S.O.M.

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,006
16,292
I mean that if I made update with my game folder that I already distributed it can lead to the bugs, like variables,
Declare them using default instead of doing it in a label, especially if it's the "start" label.
Python:
# Will be always available, and initialized only it the variable isn't present on the save file.
default myVar = "whatever"

label start:
   # Will be available only for people who (re)start the game.
   $ myOtherVar = "whatever"

missed pictures,
The only possible reasons I see for this are :
  • You use text interpolation and the variable isn't correctly defined (see above)
    Something like:
    image myImage = "images/[charName]/smiling.png"
    or
    Code:
    screen myScreen():
        imagebutton:
            idle "images/[guiVersion]/button_%s.png"
    [...]
  • The image displayed when the player saved disappeared.


developer console.
All errors shown only when developer console is enabled are to be seen as "compilation warning" ; Ren'py know how to deal with them, but there's risk that the game is broke because of them. They are due to the code and should be solved before the release of the game.
The most current being the "already defined label" one. Ren'py will then use the last encountered version of the label, but it's perhaps not the one you expected to be used.


But this is just my experience. Maybe I made something wrong.
Take a look at my signature, and read the first message of the second link. It will teach you a lot of things regarding how to keep your game compatible from an update to another, and therefore avoid most of the error you get.


But I asked some people and they agreed with me about clean version.
They were wrong.
While PyTom exaggerate the risk of deleting the "rpyc" files, doing it only hide the problem, but it never solve it. It also mess with Ren'py. Among other issues, it force to rewrite the translation files from scratch (instead of just updating them), and prevent the "skip" feature to works correctly.



I also downloaded the SDK version the dev recommended (thanks for that link!) but ran into a completely different error, something about not finding a 'scripts2.rpi' file.
Yeah, it's due to the use of the tweaked RPA files
loader.py:
Code:
            # 3.0 Branch.
            if l.startswith("RPA-3.0 "):
[...]
                continue

            # 2.0 Branch.
            if l.startswith("RPA-2.0 "):
[...]
                continue

            # 1.0 Branch.
            f.close()

            fn = transfn(prefix + ".rpi")
Like the signature of the rpa file do not correspond to the known signature, Ren'py assume that it's the historical version 1.0 of them, that where using the "rpi" extension.

If the fix I gave you don't works, it's probably that you edited the wrong file like you guess ; or that you forgot to relaunch the SDK, what mean that the changes haven't took effect.
If you feel like it, you can also have a more definitive fix:
(still loader.py)
Python:
            # 3.0 Branch.
            if l.startswith("RPA-3.0 "):
                offset = int(l[8:24], 16)
[...]
                continue

# <--- Addition for /patronus/ game
            if l.startswith("RPI-3.0 "):
                offset = int(l[8:24], 16)
                key = int(l[27:33], 16)
                f.seek(offset)
                index = loads(f.read().decode("zlib"))

                for k in index.keys():
                    if len(index[k][0]) == 2:
                        index[k] = [ (offset ^ key, dlen ^ key) for offset, dlen in index[k] ]
                    else:
                        index[k] = [ (offset ^ key, dlen ^ key, start) for offset, dlen, start in index[k] ]

                archives.append((prefix, index))
                f.close()
                continue
#     Addition for /patronus/ game --->

            # 2.0 Branch.
            if l.startswith("RPA-2.0 "):
                offset = int(l[8:], 16)
The "3.0 Branch." and "2.0 Branch" are for reference, in order to help you find where to add the code. What you've too add is the part between the two "Addition for /patronus/ game" comment lines.

I'm still at works so I can't test it, but normally if you do this change in the SDK, it should let you play the game without preventing you to play other games.
 
  • Like
Reactions: CHFan and S.O.M.

S.O.M.

Member
Game Developer
Jan 30, 2021
461
1,085
Declare them using default instead of doing it in a label, especially if it's the "start" label.
Python:
# Will be always available, and initialized only it the variable isn't present on the save file.
default myVar = "whatever"

label start:
   # Will be available only for people who (re)start the game.
   $ myOtherVar = "whatever"



The only possible reasons I see for this are :
  • You use text interpolation and the variable isn't correctly defined (see above)
    Something like:
    image myImage = "images/[charName]/smiling.png"
    or
    Code:
    screen myScreen():
        imagebutton:
            idle "images/[guiVersion]/button_%s.png"
    [...]
  • The image displayed when the player saved disappeared.




All errors shown only when developer console is enabled are to be seen as "compilation warning" ; Ren'py know how to deal with them, but there's risk that the game is broke because of them. They are due to the code and should be solved before the release of the game.
The most current being the "already defined label" one. Ren'py will then use the last encountered version of the label, but it's perhaps not the one you expected to be used.




Take a look at my signature, and read the first message of the second link. It will teach you a lot of things regarding how to keep your game compatible from an update to another, and therefore avoid most of the error you get.




They were wrong.
While PyTom exaggerate the risk of deleting the "rpyc" files, doing it only hide the problem, but it never solve it. It also mess with Ren'py. Among other issues, it force to rewrite the translation files from scratch (instead of just updating them), and prevent the "skip" feature to works correctly.





Yeah, it's due to the use of the tweaked RPA files
loader.py:
Code:
            # 3.0 Branch.
            if l.startswith("RPA-3.0 "):
[...]
                continue

            # 2.0 Branch.
            if l.startswith("RPA-2.0 "):
[...]
                continue

            # 1.0 Branch.
            f.close()

            fn = transfn(prefix + ".rpi")
Like the signature of the rpa file do not correspond to the known signature, Ren'py assume that it's the historical version 1.0 of them, that where using the "rpi" extension.

If the fix I gave you don't works, it's probably that you edited the wrong file like you guess ; or that you forgot to relaunch the SDK, what mean that the changes haven't took effect.
If you feel like it, you can also have a more definitive fix:
(still loader.py)
Python:
            # 3.0 Branch.
            if l.startswith("RPA-3.0 "):
                offset = int(l[8:24], 16)
[...]
                continue

# <--- Addition for /patronus/ game
            if l.startswith("RPI-3.0 "):
                offset = int(l[8:24], 16)
                key = int(l[27:33], 16)
                f.seek(offset)
                index = loads(f.read().decode("zlib"))

                for k in index.keys():
                    if len(index[k][0]) == 2:
                        index[k] = [ (offset ^ key, dlen ^ key) for offset, dlen in index[k] ]
                    else:
                        index[k] = [ (offset ^ key, dlen ^ key, start) for offset, dlen, start in index[k] ]

                archives.append((prefix, index))
                f.close()
                continue
#     Addition for /patronus/ game --->

            # 2.0 Branch.
            if l.startswith("RPA-2.0 "):
                offset = int(l[8:], 16)
The "3.0 Branch." and "2.0 Branch" are for reference, in order to help you find where to add the code. What you've too add is the part between the two "Addition for /patronus/ game" comment lines.

I'm still at works so I can't test it, but normally if you do this change in the SDK, it should let you play the game without preventing you to play other games.
thanks for the explanation and links! I will keep it in mind.