Under prefferences of course one can decide which text editor to use. I use sublime text.
However, I also just use notepad for .txt files (I know I know, bad program, old habits).
So when I have an error, traceback.txt is either opened in a another editor, not opened automatically at all, or opened in notepad. Because contrary to ren'py launcher's claim, the program opened is not the system program for ren'py files, but the system program for the relevant file opened (in case of traceback, .txt)
Any way to change this or otherwise resolve it? Can I change traceback to be saved as .rpy? Any way to resolve this would be appreciated.
[SOLVED] Is it possible to have traceback.txt to be saved/opened as traceback.rpy instead?
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.
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.
[SOLVED] Is it possible to have traceback.txt to be saved/opened as traceback.rpy instead?
Last edited by Chekhov on Fri Apr 09, 2021 9:11 pm, edited 1 time in total.
Re: Is it possible to have traceback.txt to be saved/opened as traceback.rpy instead?
With renpy-7.4.4-sdk, I seems to happen line 215 of renpy/error.py.
Maybe you just have to edit this line in your local installation of renpy with something like:
Might have undesired side effects, tho.
Or else, associate Sublime Text with .txt files in your OS ... If you don't like notepad already, this shouldn't be a huge loss
Maybe you just have to edit this line in your local installation of renpy with something like:
Code: Select all
f, traceback_fn = open_error_file("traceback.rpy", "w")
Or else, associate Sublime Text with .txt files in your OS ... If you don't like notepad already, this shouldn't be a huge loss
Re: Is it possible to have traceback.txt to be saved/opened as traceback.rpy instead?
It's more of a guilty pleasure and refusal to budge on that front, lol. Like I know I shouldn't use it, shouldn't like it.... but I do.If you don't like notepad already, this shouldn't be a huge loss
-----
As for your solution, in the first test it worked like it should. We'll see about possible side effects in the future, but I'm sure it will be fine
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: [SOLVED] Is it possible to have traceback.txt to be saved/opened as traceback.rpy instead?
Tracebacks open in Atom for me (I hate Atom and will be finding a different editor eventually)
Maybe you have specifically told your Operating System to associate .txt files with Notepad, which will forcibly open them in Notepad only?
Maybe you have specifically told your Operating System to associate .txt files with Notepad, which will forcibly open them in Notepad only?
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Re: Is it possible to have traceback.txt to be saved/opened as traceback.rpy instead?
Software developpers can be principled individuals, so your guilty adhesion to Notepad is perfectly normal lol
Remember you may lose this modification next time you'll update Ren'Py SDK.
Maybe take notes where and why you did it now (while you remember it), or create a patch you'd apply after each SDK update ...
As you're on windows, patch utility is out, but if you use git for updates, this could be done with git patch.
Glad to hear that.
Remember you may lose this modification next time you'll update Ren'Py SDK.
Maybe take notes where and why you did it now (while you remember it), or create a patch you'd apply after each SDK update ...
As you're on windows, patch utility is out, but if you use git for updates, this could be done with git patch.
- Ocelot
- Lemma-Class Veteran
- Posts: 2402
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: [SOLVED] Is it possible to have traceback.txt to be saved/opened as traceback.rpy instead?
RenPy saves traceback files as .txt, because they are text files. It doesn't save them as .rpy, because they are not .rpy files: they do not contain renpy code.
To save traceback files as .rpy makes as much sense as saving them as .wav or .mp4: you can do that, but you shouldn't. I do not remember, where RenPy saves traceback by default, but if it is something within game directory RenPy might try to load it and crash.
If you are still refusing to change default program for .txt files, you can save tracebacks as .log files instead and change default program for those. That would be optimal solution in this case.
To save traceback files as .rpy makes as much sense as saving them as .wav or .mp4: you can do that, but you shouldn't. I do not remember, where RenPy saves traceback by default, but if it is something within game directory RenPy might try to load it and crash.
If you are still refusing to change default program for .txt files, you can save tracebacks as .log files instead and change default program for those. That would be optimal solution in this case.
< < insert Rick Cook quote here > >
Re: Is it possible to have traceback.txt to be saved/opened as traceback.rpy instead?
That's nice of you to say, but I consider it completely unwise and emotional instead, lol.
This is a really great suggestion, thanks.Glad to hear that.
Remember you may lose this modification next time you'll update Ren'Py SDK.
Maybe take notes where and why you did it now (while you remember it), or create a patch you'd apply after each SDK update ...
As you're on windows, patch utility is out, but if you use git for updates, this could be done with git patch.
This is so much cleaner, thanks, great suggestion.Ocelot wrote: ↑Sat Apr 10, 2021 3:47 am RenPy saves traceback files as .txt, because they are text files. It doesn't save them as .rpy, because they are not .rpy files: they do not contain renpy code.
To save traceback files as .rpy makes as much sense as saving them as .wav or .mp4: you can do that, but you shouldn't. I do not remember, where RenPy saves traceback by default, but if it is something within game directory RenPy might try to load it and crash.
If you are still refusing to change default program for .txt files, you can save tracebacks as .log files instead and change default program for those. That would be optimal solution in this case.
Good luck going for a new editor!
Very helpful guys! I hope I can help people like this in the future.
Who is online
Users browsing this forum: Ahrefs [Bot], fufuffiero, Sugar_and_rice