[OLPC-Games] olpcgames SVGSprite bug + fix
Mike C. Fletcher
mcfletch at vrplumber.com
Wed Jul 23 11:06:57 EDT 2008
Alex Levenson wrote:
> Hello,
>
> I've been using olpcgames for some physics + puzzle games I'm writing.
> I just started using the SVGSprite class but I kept on getting an
> error when using it. I realized that in the SVGSprite class a module
> named 'svg' is imported, AND a local variable is named svg. So when
> you call svg.render() it tries it on the local variable (which is a
> string) and then that causess a crash.
> The fix is easy, change the line at the top of svgsprite.py from:
> from olpcgames import svg
> to:
> from olpcgames import svg as svgModule
> and then later in the code there is one reference to svg that needs to
> be changed to svgModule.
> Basically just a python scope issue, but I don't know who maintains
> olpcgames so I decided to just send this to devel.
I'm the maintainer AFAIK, though this is the first bug report I've had
on the project in... well, something like 7 months, so maybe someone
else redirected the reports to themselves at some point? I've just
checked in a fix in GIT, however, it's been so long since I worked on it
I'm afraid I'm not sure if it's safe to release a patch without some
serious testing (IIRC I was in the middle of some non-trivial
refactoring 7 months ago when I ran out of funds/time to work on it (at
some point I bumped the version to 2.0, so there's likely some breakage
occurring)).
I'll try to rebuild a Sugar working environment and test the changes today.
Take care,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
More information about the Games
mailing list