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

'NoneType' object has no attribute 'append'

Tutti Frutti

Member
Jun 20, 2018
210
250
Hello to everyone,
I'm developing myself for coding, compression or android port construction. I can't handle some problems. I'm dealing with the file of made with the renpy emulator. When I open the game with renpy 7.3.2, I get the following error code.
You don't have permission to view the spoiler content. Log in or register now.

If you have someone to help I can share the codes in the script.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,017
16,307
Is there anyone who can help with Renpy codes?
Er... There's an append in the do_next_thing method pointed by Ren'py, but it shouldn't be reached by a None value :
Python:
                if new_event:  # <- /None/ don't match the condition.
                    self.events.append(new_event)
But, the line just above this is also pointed by the traceback, new_event = this_event.do_next_thing(), and look strange.
What is the type of this_event ? Because the only do_next_thing method in the code you provided, is in the GameState class, and expect two parameters that aren't provided here.
So, the error can in fact come from Ren'py, when he try to add the something to a none existing list of parameters.
 

shark_inna_hat

Active Member
Game Developer
Dec 25, 2018
705
2,766
self.events would need to be None for that error to appear. I don't see anything like
Code:
self.events = None
here, and as far as I know list comprehension will never return None, so I think you need to grep for self.events in your other files to see if something ain't setting it to None.
 

Tutti Frutti

Member
Jun 20, 2018
210
250
self.events would need to be None for that error to appear. I don't see anything like
Code:
self.events = None
here, and as far as I know list comprehension will never return None, so I think you need to grep for self.events in your other files to see if something ain't setting it to None.

I searched all the files. Self.event is in the games_state file I shared. Not available in another file.
 

Tutti Frutti

Member
Jun 20, 2018
210
250
Er... There's an append in the do_next_thing method pointed by Ren'py, but it shouldn't be reached by a None value :
Python:
                if new_event:  # <- /None/ don't match the condition.
                    self.events.append(new_event)
But, the line just above this is also pointed by the traceback, new_event = this_event.do_next_thing(), and look strange.
What is the type of this_event ? Because the only do_next_thing method in the code you provided, is in the GameState class, and expect two parameters that aren't provided here.
So, the error can in fact come from Ren'py, when he try to add the something to a none existing list of parameters.

I changed it to None because of the ambiguity of this_event.do_next_thing ().

Code:
    new_event = None
    if new_event:
        self.events.append(new_event)
And now a new mistake.
Code:
    I'm sorry, but an uncaught exception occurred.

    While running game code:
      File "game/script.rpy", line 238, in script
        if not in_interaction:
    Exception: Possible infinite loop.

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

    Full traceback:
      File "game/script.rpy", line 238, in script
        if not in_interaction:
      File "C:\Game\renpy-7.3.2-sdk\renpy\execution.py", line 59, in check_infinite_loop
        raise Exception("Possible infinite loop.")
    Exception: Possible infinite loop.

    Windows-7-6.1.7601-SP1
    Ren'Py 7.3.2.320
    ics1 0.6.9
    Mon Aug 12 22:40:58 2019
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,017
16,307
I changed it to None because of the ambiguity of this_event.do_next_thing ().

Code:
    new_event = None
    if new_event:
        self.events.append(new_event)
What exactly are you trying to do ?
You assign a fixed value to a variable that will be tested in the line right after and never be used again. And with the value you assign to the said variable, the test will always fail.

This make absolutely no sense.
 

selectivepaperclip

Active Member
Modder
Donor
Respected User
Feb 19, 2017
537
3,506
As stated in the rpgm2renpy thread, the version of rpgm2renpy that shipped with the Incest Story 1 port only works with

The development version on GitHub supports up to RenPy 7.22, though I haven't tested playing through Incest Story 1 with the latest version so I don't know if it's completable.

RenPy 7.3x isn't supported yet because of this "'NoneType' object has no attribute 'append'" error. I don't know what's causing it yet, the stack trace is deceptive because the error is occurring deep in the RenPy guts, probably a displayable I set up in a way that's not supported anymore.
 
  • Like
Reactions: Tutti Frutti

Tutti Frutti

Member
Jun 20, 2018
210
250
What exactly are you trying to do ?
You assign a fixed value to a variable that will be tested in the line right after and never be used again. And with the value you assign to the said variable, the test will always fail.

This make absolutely no sense.
I'm sorry, but I'm new to this. When you questioned "this.evet" there, I thought of removing it. Can you explain exactly the solution I need to implement? I understand better when implement. I've been interested in coding for 9-10 months. I'm just learning on my own. I'm sorry for my inexperience.
 

Tutti Frutti

Member
Jun 20, 2018
210
250
As stated in the rpgm2renpy thread, the version of rpgm2renpy that shipped with the Incest Story 1 port only works with

The development version on GitHub supports up to RenPy 7.22, though I haven't tested playing through Incest Story 1 with the latest version so I don't know if it's completable.

RenPy 7.3x isn't supported yet because of this "'NoneType' object has no attribute 'append'" error. I don't know what's causing it yet, the stack trace is deceptive because the error is occurring deep in the RenPy guts, probably a displayable I set up in a way that's not supported anymore.


Why games with the old version do not work with the new version renpy. It is really interesting. :unsure:
I will download and try version 6.99. I'll make a return about the outcome.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,017
16,307
RenPy 7.3x isn't supported yet because of this "'NoneType' object has no attribute 'append'" error. I don't know what's causing it yet, the stack trace is deceptive because the error is occurring deep in the RenPy guts, probably a displayable I set up in a way that's not supported anymore.
Don't think that it's this simple. The problem would happen too often and by reported more ; apparently in this case it was because of a side image. It look more like a side effect.
Technically, the error happen in a part that haven't changed since the 6.99.14 (and perhaps above I haven't gone further in the past) :
Code:
try:
        rendering += 1
        old_st = render_st
        old_at = render_at
        render_st = st
        render_at = at
        rv = d.render(widtho, heighto, st, at)
    finally:
        rendering -= 1
        render_st = old_st
        render_at = old_at

    if rv.__class__ is not Render:
        raise Exception("{!r}.render() must return a Render.".format(d))

    rv.render_of.append(d)   # <- The error is triggered here
The return value of [displayable].render return an object of the right class. But instead of the expected list for its render_of attribute, Ren'py found a None value.
When you look at the code, rv is a Render object and render_of is used six times :
  • Initialized as empty list in __init__ ;
  • Displayed in __repr__ ;
  • Iterated in main_displayables_at_point ;
  • Assigned in subsurface, but assigned a slice ;
  • Iterated in kill_cache ;
  • Assigned in kill_cache... and assigned with a None value.

The last entry have been introduced in the version 7.2.0, so if the same error is triggered with the version 7.2.0, but not with the version 7.1.3, it's the culprit.
You can also test it by editing "renpy/display/render.pyx:1113" (for the 7.3.1 version) and replacing the None by an empty list. But this isn't a Python file, by a CPython one, so for the change to take effect, you need to compile it, the put the library in the "lib/[your platform]/Lib/renpy" folder.

Now, if it's effectively the culprit, the question is why Ren'py suddenly try to works with a rendered object that have been removed from the cache ? And I have no idea, but there's chance that this part of the error come from your own code.
 

Tutti Frutti

Member
Jun 20, 2018
210
250
Fikirleriniz ve desteğiniz için hepinize teşekkür ederim. Oyun 6.99 sürümünde çalıştı. (Bence saçma. Yeni sürüm doğru yönde geliştirilmeli, ancak eski oyunlarda hatalar veriyor.)
Ben de android versiyonunu yaptım. Telefonu indiriyor, ancak oyun açılmıyor. (Sony Z1) Telefonumda bir sorun olduğunu düşünüyorum.
Aynı sorunu görmek için Samsung Note 8'i deneyeceğim. Merak ettiğim bir diğer konu: 6.99 sürümünde neden evrensel apk yapamıyorum? Bana bir seçenek sunuyor. Bunun evrensel bir apk olduğunu nasıl bilebilirim?
Herkes için 3 ayrı apk yapmam gerekiyor mu? (Ekli resim)

Hepinize tekrar teşekkürler.
You don't have permission to view the spoiler content. Log in or register now.
 

Tutti Frutti

Member
Jun 20, 2018
210
250
Don't think that it's this simple. The problem would happen too often and by reported more ; apparently in this case it was because of a side image. It look more like a side effect.
Technically, the error happen in a part that haven't changed since the 6.99.14 (and perhaps above I haven't gone further in the past) :
Code:
try:
        rendering += 1
        old_st = render_st
        old_at = render_at
        render_st = st
        render_at = at
        rv = d.render(widtho, heighto, st, at)
    finally:
        rendering -= 1
        render_st = old_st
        render_at = old_at

    if rv.__class__ is not Render:
        raise Exception("{!r}.render() must return a Render.".format(d))

    rv.render_of.append(d)   # <- The error is triggered here
The return value of [displayable].render return an object of the right class. But instead of the expected list for its render_of attribute, Ren'py found a None value.
When you look at the code, rv is a Render object and render_of is used six times :
  • Initialized as empty list in __init__ ;
  • Displayed in __repr__ ;
  • Iterated in main_displayables_at_point ;
  • Assigned in subsurface, but assigned a slice ;
  • Iterated in kill_cache ;
  • Assigned in kill_cache... and assigned with a None value.

The last entry have been introduced in the version 7.2.0, so if the same error is triggered with the version 7.2.0, but not with the version 7.1.3, it's the culprit.
You can also test it by editing "renpy/display/render.pyx:1113" (for the 7.3.1 version) and replacing the None by an empty list. But this isn't a Python file, by a CPython one, so for the change to take effect, you need to compile it, the put the library in the "lib/[your platform]/Lib/renpy" folder.

Now, if it's effectively the culprit, the question is why Ren'py suddenly try to works with a rendered object that have been removed from the cache ? And I have no idea, but there's chance that this part of the error come from your own code.
Dude, you're talking great. But believe me, I have a long way to catch up with you. Believe me, I'd do anything to be like you. But I'm doing my best. LOL ... I envy you. Teach me CODING. :LOL::ROFLMAO::LOL:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,017
16,307
Teach me CODING. :LOL::ROFLMAO::LOL:
Do you have 30 years free ? ;)
There's no secrets. If I'm good now, it's because I wasn't during so many years. Seeing my co-workers cry, crying myself. Happily learning from the older and their "wtf have you done" ; well, probably more happily learning when I wasn't the "you" :D
It's time and practice that lead me here, just that.
 
  • Like
Reactions: Tutti Frutti

Tutti Frutti

Member
Jun 20, 2018
210
250
Turkey in drawing and programming behind other countries. Even the teachers didn't get the right education. The masters of this work also work in large companies. I am 35 years old. I was more interested in office programs. E.g; there are those around me who don't know what the right mouse button does. If they see what I'm doing, they'il look at me like a cow looking at a train. What's interesting is that I look at you the same way :giggle: This is a hobby for me. Not by typing codes. I'm trying to learn by seeing mistakes.
 

Tutti Frutti

Member
Jun 20, 2018
210
250
The apk files I created with version 6.99 are incompatible with next generation phones. I don't know how to make the game compatible with 7.3.2? Can I follow the same coding path and recreate the game on 7.3.2?
 

selectivepaperclip

Active Member
Modder
Donor
Respected User
Feb 19, 2017
537
3,506
Can I follow the same coding path and recreate the game on 7.3.2?
It's not gonna work with 7.3.2 until I fix whatever is causing this "'NoneType' object has no attribute 'append'" error mentioned above. No idea when that might happen.

Even then, it's not as simple as pulling down the released version from the Incest Story 1 thread and loading it in the newest RenPy; there's some fixes required from the GitHub version, otherwise any RenPy version from 7.x or up will just show a black screen.

Have you played the Incest Story 1 port on a desktop yet? I really don't think it will survive the trip to Android, even just from a usability perspective. So much of the gameplay involves clicking on tiny squares and the code has made no affordances for touch devices (no pinch-zooming for example).

You might still find it an interesting technical exercise to get running, but I don't understand the drive to want to port games to Android that weren't made with a mobile interface in mind.
 
  • Like
Reactions: Tutti Frutti

Tutti Frutti

Member
Jun 20, 2018
210
250
It's not gonna work with 7.3.2 until I fix whatever is causing this "'NoneType' object has no attribute 'append'" error mentioned above. No idea when that might happen.

Even then, it's not as simple as pulling down the released version from the Incest Story 1 thread and loading it in the newest RenPy; there's some fixes required from the GitHub version, otherwise any RenPy version from 7.x or up will just show a black screen.

Have you played the Incest Story 1 port on a desktop yet? I really don't think it will survive the trip to Android, even just from a usability perspective. So much of the gameplay involves clicking on tiny squares and the code has made no affordances for touch devices (no pinch-zooming for example).

You might still find it an interesting technical exercise to get running, but I don't understand the drive to want to port games to Android that weren't made with a mobile interface in mind.

:unsure: You are right about everything but there are those who want to use the anroid version of this game. I wanted to take my chances. Apparently it will be impossible to apply to the next generation android devices. I'm giving up this job for now. Thank you all again.