New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #12
Fixes #12
Conversation
Traceback (most recent call last): File "/usr/share/sugar/activities/jamath.activity/sugargame/canvas.py", line 65, in _run_pygame_cb main_fn() File "/usr/share/sugar/activities/jamath.activity/juego.py", line 254, in run self.play(level) File "/usr/share/sugar/activities/jamath.activity/juego.py", line 186, in play fondo = [load_image("data/" + str(x) + ".jpg") for x in range(0,NUM_IMAGES)] File "/usr/share/sugar/activities/jamath.activity/juego.py", line 261, in load_image return pygame.image.load(path).convert_alpha() pygame.error: Couldn't open data/data/0.jpg Introduced by commit 183ace7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a small code review. Haven't tested it yet. Btw, is there any reason why Sugargame 1.3 was not used ?
Traceback (most recent call last): File "/usr/share/sugar/activities/jamath.activity/sugargame/canvas.py", line 65, in _run_pygame_cb main_fn() File "/usr/share/sugar/activities/jamath.activity/juego.py", line 254, in run self.play(level) File "/usr/share/sugar/activities/jamath.activity/juego.py", line 189, in play puntuacionalta = load_puntuacionalta() File "/usr/share/sugar/activities/jamath.activity/juego.py", line 289, in load_puntuacionalta file_path = os.path.join(os.environ['SUGAR_ACTIVITY_ROOT'], 'data', 'PuntajeAlto') File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__ raise KeyError(key) KeyError: 'SUGAR_ACTIVITY_ROOT'
Fix : run should not include pygame.init, stop pygame animation on use of GTK stop button, return on quit, change toolbar definition
Warning, unable to load: data/./data/menu.ogg Warning, unable to load: data/./data/right.ogg Warning, unable to load: data/./data/wrong.ogg
Made changes as suggested; @quozl @srevinsaju @chimosky Kindly review and test again :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed again. Almost ready!!
activity_root which has the path returned by get_activity_root(), is passed as an argument to the functions
The activity was not usable before these changes.
Also Fixes #4
Regarding commit - f9e7aeb : The required change is due to version differences of Libpng. From what I found, Libpng-1.6 is more stringent about checking ICC profiles than previous versions. We can ignore the warning but to get rid of it, we need to remove the iCCP chunk from the PNG image.
@chimosky @quozl @srevinsaju Please test and review :)