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

[SOLVED] Renpy has randomly decided that my list is now a string...

KitsuneZeta

Newbie
Dec 12, 2020
20
13
I get:
profile_girls.append
'BlackCanary'
There's our confirmation of the problem: somewhere, you have a line that has .append =, which is replacing that bound function with a string. I would suggest you start by looking for the offending line. If you're using Atom as your editor (or VSCODE, for that matter), CTRL+SHIFT+F is your friend here, as that will let you search EVERY file for a given piece of text.

I would be surprised if the erroneous line is literally $ profile_girls.append = 'BlackCanary', but I have seen - and done - dumber things than that before.

Note that due to HOW Ren'Py handles stuff in the store (which includes that now-verified-broken object), you may have to either load an earlier save or straight-up start a new game after fixing it.
 
  • Yay, update!
  • Wow
Reactions: Saki_Sliz and OhWee

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,913
30,067
There's our confirmation of the problem: somewhere, you have a line that has .append =, which is replacing that bound function with a string. I would suggest you start by looking for the offending line. If you're using Atom as your editor (or VSCODE, for that matter), CTRL+SHIFT+F is your friend here, as that will let you search EVERY file for a given piece of text.

I would be surprised if the erroneous line is literally $ profile_girls.append = 'BlackCanary', but I have seen - and done - dumber things than that before.

Note that due to HOW Ren'Py handles stuff in the store (which includes that now-verified-broken object), you may have to either load an earlier save or straight-up start a new game after fixing it.
Thanks, I found the line that you suggested might exist. Fixing it now. I really appreciate you taking the time to walk me through this.

Walls of text aren't helpful to me, and links to Ren'Py documentation generally don't help either. For others, yes, but Python is DEFINITELY not my jam.
 

Saki_Sliz

Well-Known Member
May 3, 2018
1,403
1,013
I wouldn't be too hard on OhWee, I'm not the most familiar with python, having more of a C# background (as I say this every time i mention me and python XP) but I'll say, while Anne does say

It's not "profile_girls" the problem, it's "append". The "append" method have been redefined and is now a string. Search for "profile_girls.append = " and you'll find the faulty line.
which was the solution, I feel like this was more like a professor stating the answer, and me being the dumb ass kid who hears the words but doesn't make the connection (but how does 2+2 become 4?!), I basically chalked it up to 'python talk.' Things that sound like a python explanation, but I don't know if I 100% understand.

a method being redefined in C# is something very intention and only done by design (often creating a class with the same function name, and being forced to use the 'new' or 'override' keyword). after reading through the replies I think the two brain cell I have finally got the meanings of the "redefined" and "profile_girls.append = " being in the same sentance.

It blows my mind just how flexible and hazardous python is! To accidently override a function by accidently using the wrong syntax, and for it to be syntactically correct?! Ah! Kitsune's explaination does help a bit since its not just the answer, but a path to the answer (like using the concept of a number line to explain basic addition)

Likewise, depending on education, profession, and personally exploration, one tends to learn a unique set of terminology can get in the way. for example
A list is in fact a [I]renpy.Python.RevertableList[/I] object. But this object inherit directly from list, just ensuring that it will be compliant with the rollback.
by my own terminology, renpy replacing the list class with its own type of list class inherited from list is in itself a type of wrapper class, with 'wrapper class' also being understood through my own unique set of terminology which could differ from other people's vernacular.
 
Last edited:
  • Like
Reactions: Alcahest and OhWee

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,494
4,337
I wouldn't be too hard on OhWee
I apologize to OhWee if I came off too harsh. To me the answer given by Anne was so easy to understand I thought it was just a matter of OhWee having Anne on ignore (no idea if that is true).

It blows my mind just how flexible and hazardous python is! To accidently override a function by accidently using the wrong syntax, and for it to be syntactically correct?!
I would call it evil. :LOL: I never considered append could have been redefined.

I have no experience with python/renpy other than what I've seen in threads such as these. Not a big fan of renpy code, but I'm preparing myself for possibly using renpy for a future project, so I'm hoping I will like coding in renpy more by getting used to it. Threads like this is a good way to learn things.
 
  • Like
Reactions: Saki_Sliz and OhWee

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,913
30,067
Alcahest

Your apology is most appreciated.

As I said, walls of text aren't generally helpful to me. My eyes gloss over every time I try to google search answers for stuff like this (which is quite often) and end up on StackExchange or whatever, where they assume that you are comfortable with Python, which I am not.

But, I muddle through anyways! Other people grok Python, and to a lesser extent Ren'Py, I just try my best...

@KitzuneZeta was able to succinctly explain how to check for the 'offending line' by giving me a python check that was meaningful to me, and I was able to find the offending line from there. I have code scattered across multiple .rpy files, so if Ren'Py doesn't tell me which file and which line is 'broken', I'm usually at a loss...

Other people could probably code what I'm trying to do here (a Ren'Py port of SU) in about a third of the time it takes me, but helping with a community project build is a thankless job, sooo...

I actually prefer Ren'Py. It's as easy or as hard as you choose to make things, depending on how complicated the task you are trying to accomplish is. But for basic storytelling it's easy peasy. It's when you are making say girl management screens then things can get rather complex...

The error reporting feature in Ren'Py is usually rather helpful, and the autoreload makes coding a snap, as you can watch things in'real time' to see if you break anything after you save your edits...
 
  • Like
Reactions: Alcahest

Jables

New Member
Oct 31, 2017
12
5
Alcahest

Your apology is most appreciated.

As I said, walls of text aren't generally helpful to me. My eyes gloss over every time I try to google search answers for stuff like this (which is quite often) and end up on StackExchange or whatever, where they assume that you are comfortable with Python, which I am not.

But, I muddle through anyways! Other people grok Python, and to a lesser extent Ren'Py, I just try my best...

@KitzuneZeta was able to succinctly explain how to check for the 'offending line' by giving me a python check that was meaningful to me, and I was able to find the offending line from there. I have code scattered across multiple .rpy files, so if Ren'Py doesn't tell me which file and which line is 'broken', I'm usually at a loss...

Other people could probably code what I'm trying to do here (a Ren'Py port of SU) in about a third of the time it takes me, but helping with a community project build is a thankless job, sooo...

I actually prefer Ren'Py. It's as easy or as hard as you choose to make things, depending on how complicated the task you are trying to accomplish is. But for basic storytelling it's easy peasy. It's when you are making say girl management screens then things can get rather complex...

The error reporting feature in Ren'Py is usually rather helpful, and the autoreload makes coding a snap, as you can watch things in'real time' to see if you break anything after you save your edits...
What editor are you using to manage the project? If you use VSCode, for example, you select a directory as your project root. You can then use directory search. That means it will try to find your match in all the files of the currently opened directory. The reason I recommend VSCode is because it works with any programming language, and it's industry standard for a bunch of languages.
 

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,913
30,067
What editor are you using to manage the project? If you use VSCode, for example, you select a directory as your project root. You can then use directory search. That means it will try to find your match in all the files of the currently opened directory. The reason I recommend VSCode is because it works with any programming language, and it's industry standard for a bunch of languages.
Notepad 2...