Ren'Py Ren'Py Launcher doesn't launch projects

onionbros

Rodion Raskolnikov
Game Developer
Feb 1, 2019
64
159
Hello friends,

I have a fairly severe issue. I cannot launch my current project anymore. When I click on "Launch Project" the command window opens, but nothing happens after that. I can however still open the standard Ren'Py Tutorial games. I've tried reinstalling Ren'Py but that didn't seem to change anything.

I've really done nothing unusual at all, the last thing I noticed was that I think I deleted a file at the same time as the game was auto-updating. Instead of opening the traceback file, the game crashed without a traceback file, which I thought was quite odd.

The most recent traceback file that I have (and I'm not sure if this is even related to this issue) is this:

I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 67, in script call
call discretion
File "renpy/common/000statements.rpy", line 569, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "renpy/common/00director.rpy", line 293, in interact
show_director = interact_base()
File "renpy/common/00director.rpy", line 248, in interact_base
if [ i for i in renpy.scriptedit.nodes_on_line(filename, line) if not isinstance(i, ALONE_NODES) ]:
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position 48: invalid continuation byte

Can anyone help with this?

Best,
onion
 

MissFortune

I Was Once, Possibly, Maybe, Perhaps… A Harem King
Respected User
Game Developer
Aug 17, 2019
5,295
8,551
I'm no expert when it comes to code (or even Ren'py for that matter), but have you tried retracing your steps. You said you deleted the file as the game was auto-refreshing (is what I assume you meant.). Have you tried putting the file back? Try putting it back, opening the launcher, select your game and hit "Delete Persistent". This will delete your saves, iirc. Then try it again. Probably won't fix it, but it might be worth a shot. Could also try an older/newer version to see if that fixes it, as well.

Seems like the error might be related to "call discretion" though? Maybe there's a typo or something of the sort. I'm sure someone (like Anne or 79flavors) will come around with a more in-depth answer that'll do the trick. But if it comes down to it, you can always create a new project and copy-paste your code/writing in bit-by-bit until you run into the error you're currently getting. it'll take a bit to do, but you should probably be able to narrow it down that way.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,849
15,974
When I click on "Launch Project" the command window opens, [...]
This shouldn't happen. Both Ren'Py and Python executable are Windows PE and do not trigger the command window. Generally this kind of behavior happen when the anti-virus interfere, but...

I can however still open the standard Ren'Py Tutorial games.
This do not correspond to this said behavior. An anti-virus have no reason to be this selective, it would be either everything, or nothing.


I've really done nothing unusual at all, the last thing I noticed was that I think I deleted a file at the same time as the game was auto-updating. Instead of opening the traceback file, the game crashed without a traceback file, which I thought was quite odd.
Not this odd. But the main problem I have is the "nothing works except the tutorial" part.


File "renpy/common/00director.rpy", line 248, in interact_base
if [ i for i in renpy.scriptedit.nodes_on_line(filename, line) if not isinstance(i, ALONE_NODES) ]:
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc5 in position 48: invalid continuation byte
The file is not a valid Unicode file. Try to force the recompilation of all rpyc for the project, and see if it solve your issue.
 

onionbros

Rodion Raskolnikov
Game Developer
Feb 1, 2019
64
159
This shouldn't happen. Both Ren'Py and Python executable are Windows PE and do not trigger the command window. Generally this kind of behavior happen when the anti-virus interfere, but...



This do not correspond to this said behavior. An anti-virus have no reason to be this selective, it would be either everything, or nothing.




Not this odd. But the main problem I have is the "nothing works except the tutorial" part.




The file is not a valid Unicode file. Try to force the recompilation of all rpyc for the project, and see if it solve your issue.
Hi thanks for the help so far. I'm really lost...

Unfortunately I can't "force recompile" since that also is not possible if the game does not launch:
1651419962684.png
 

onionbros

Rodion Raskolnikov
Game Developer
Feb 1, 2019
64
159
I'm no expert when it comes to code (or even Ren'py for that matter), but have you tried retracing your steps. You said you deleted the file as the game was auto-refreshing (is what I assume you meant.). Have you tried putting the file back? Try putting it back, opening the launcher, select your game and hit "Delete Persistent". This will delete your saves, iirc. Then try it again. Probably won't fix it, but it might be worth a shot. Could also try an older/newer version to see if that fixes it, as well.

Seems like the error might be related to "call discretion" though? Maybe there's a typo or something of the sort. I'm sure someone (like Anne or 79flavors) will come around with a more in-depth answer that'll do the trick. But if it comes down to it, you can always create a new project and copy-paste your code/writing in bit-by-bit until you run into the error you're currently getting. it'll take a bit to do, but you should probably be able to narrow it down that way.
Hi thanks for the advice, but I don't think this is the issue. "Call discretion" is simply a call to the introduction of the game, which I haven't changed at all, so it makes no sense that the error would be there.

I really hope I won't have to check the files one by one :cry:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,849
15,974
Unfortunately I can't "force recompile" since that also is not possible if the game does not launch:
It's really strange, because it seem that there's more than one issue.

There's the fact that the command window opens, what shouldn't happen, but by itself don't explain the problem.
There's the fact that the tutorials works, what mean that the SDK by itself isn't the problem.
But the traceback you gave clearly point to the interactive director feature, what normally rely on the rpyc file.

Try to force the interactive director off.
Put this:
Code:
init python:
    director.state.show_director = False
    director.state.active = False
in whatever rpy file, and see if it change something.

You can also try to "delete persistent" data, but it feel like a last hope option.
 

onionbros

Rodion Raskolnikov
Game Developer
Feb 1, 2019
64
159
It's really strange, because it seem that there's more than one issue.

There's the fact that the command window opens, what shouldn't happen, but by itself don't explain the problem.
There's the fact that the tutorials works, what mean that the SDK by itself isn't the problem.
But the traceback you gave clearly point to the interactive director feature, what normally rely on the rpyc file.

Try to force the interactive director off.
Put this:
Code:
init python:
    director.state.show_director = False
    director.state.active = False
in whatever rpy file, and see if it change something.

You can also try to "delete persistent" data, but it feel like a last hope option.
The command window has been opening ever since I first compiled the game. It runs alongside the game, but closing it also closes the game. However this was never really a problem before. I have a feeling this is not the issue. But just in case this is what it looks like, the window opens for about 1-2 seconds (does nothing) and then disappears.
1651424319628.png

I tried adding the director statements, but that also did not help. I've also already tried removing the persistent data, but also with no success. I obviously also tried restarting mc pc...

I suppose I will have to make a new project and copy the files to see where the mistake lies. I can't find anything online...
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,849
15,974
The command window has been opening ever since I first compiled the game. It runs alongside the game, but closing it also closes the game. However this was never really a problem before. I have a feeling this is not the issue.
It's not the issue, but it's an issue ; launching the game from the SDK should not show the command window.
Ren'Py normally using "pythonw.exe" (a Windows executable, that do not trigger the command window. It's only when it can't run it, what should never happen, that it will fallback to "python.exe", that will trigger the command window. Generally, this mean that your anti-virus have flagged "pythonw.exe" as a virus ; what it isn't.
Who know, since it flagged the Windows version of the Python interpreter, perhaps that your anti-virus also restraint the DOS version. I doubt, because you can play the tutorial, but solving this issue would already be a step in the right direction.


I suppose I will have to make a new project and copy the files to see where the mistake lies. I can't find anything online...
Start by creating a new project and see if you can launch it when it's blank.
Then go step by step, not copying all the scripts in one go. It's not really a problem if there's parts missing that prevent the game to start. The fact that Ren'Py tell you that there's something missing would already be a progress ; ideally, this should help you to isolate the part where the problem is.
 

onionbros

Rodion Raskolnikov
Game Developer
Feb 1, 2019
64
159
It's not the issue, but it's an issue ; launching the game from the SDK should not show the command window.
Ren'Py normally using "pythonw.exe" (a Windows executable, that do not trigger the command window. It's only when it can't run it, what should never happen, that it will fallback to "python.exe", that will trigger the command window. Generally, this mean that your anti-virus have flagged "pythonw.exe" as a virus ; what it isn't.
Who know, since it flagged the Windows version of the Python interpreter, perhaps that your anti-virus also restraint the DOS version. I doubt, because you can play the tutorial, but solving this issue would already be a step in the right direction.




Start by creating a new project and see if you can launch it when it's blank.
Then go step by step, not copying all the scripts in one go. It's not really a problem if there's parts missing that prevent the game to start. The fact that Ren'Py tell you that there's something missing would already be a progress ; ideally, this should help you to isolate the part where the problem is.
Okay thanks for all the help, the problem is solved. As you have suggested, I made a new project and slowly copied my files into it. The bug was somewhere in the options.rpy, but I can't tell you what it was. In the new project's options.rpy , I simply copied the few manual changes I had made to the standard file and suddenly it was working. To my knowledge the files are identical... weird

The command window still opens in the background same as before, but now the game is also launched.

Best,
onion