[Sugar-devel] Moon activity fail to start when system date is invalid

Lionel Laské lionel at olpc-france.org
Sat Jun 14 17:36:22 EDT 2014


Hi all,

Testing a new OS build on an XO-1, I was surprised to have an issue on Moon
activity (failed to start, see log below). Trying to understand why into
the source code, I finally understood that it was related to an invalid
system date (set around 1999). Seems that Moon activity can't work if the
system date is under 2000. Not really an issue but good to know thought.

Just my two cents.

                  Lionel.

P.S.: Tested on Moon version 16, the latest one

Traceback (most recent call last):

 File "/usr/bin/sugar-activity", line 154, in <module>

 main()

 File "/usr/bin/sugar-activity", line 149, in main

 instance = create_activity_instance(activity_constructor, activity_handle)

 File "/usr/bin/sugar-activity", line 36, in create_activity_instance

 activity = constructor(handle)

 File "/home/olpc/Activities/Moon.activity/moon.py", line 147, in __init__

 self.build_main_layout_cb()

 File "/home/olpc/Activities/Moon.activity/moon.py", line 199, in
build_main_layout_cb

 self.update_text_information_view()

 File "/home/olpc/Activities/Moon.activity/moon.py", line 279, in
update_text_information_view

 self.data_model.update_moon_calculations(time.time())

 File "/home/olpc/Activities/Moon.activity/moon.py", line 502, in
update_moon_calculations

 last_new_moon_sec = self.last_new_moon_sec_at_time(the_date)

 File "/home/olpc/Activities/Moon.activity/moon.py", line 646, in
last_new_moon_sec_at_time

 return now - last

UnboundLocalError: local variable 'last' referenced before assignment

Exited with status 1, pid 899 data (None, <open file '<fdopen>', mode 'w'
at 0xaa48ee8>, dbus.ByteArray('d2a82a67039af6260bd68566a7b5ca135eddf277',
variant_level=1))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140614/79c3fe29/attachment.html>


More information about the Sugar-devel mailing list