[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] RenderUpdate changes in pygame 1.7?



Hey,

yeah there were sprite changes between 1.6 and 1.7.  They were
rewritten in fact.

However they were supposed to be backwards compatible(I think).

I just tried it 1.7.1 with the aliens.py example, and it iterated ok
over the group.  I added to line 305:

        for sp in all:
            print sp


Can you please test again that it is a RenderUpdates group and not
something else?  You are not subclassing RenderUpdates are you?


Cheer.


On 10/8/05, Luke Miller <dodgyville@xxxxxxxxx> wrote:
> Hello!
>
> In pygame 1.6, I have a collection of sprites in a RenderUpdate group,
> and my code looks like this:
>
> for i in myCollection:
>    blah
>
> Now, in pygame 1.7 I get an error when this code is running.
> typeerror: iteration over non-sequence
>
> From my debugging, I know that at that point in the code,
> myCollection is a <RenderUpdates(3 sprites)>
>
> This code has worked perfectly in the past (on pygame 1.6) and i think
> the only difference is I'm now running python 2.4 and pygame 1.7.
>
> And I don't think anything changed my end between versions of pygame.
> Was there a change to the internal structure of some of the sprite
> groups? Is there an easy fix for this?
>
> Thanks,
> Luke
>