Below is a simple sugar app and the log it creates when run on today's build.<br><br>There appears to be a problem with:<br>[1] AttributeError: 'crop' object has no attribute '_activity_type'<br>and<br>[2] AttributeError: 'NoneType' object has no attribute 'get_name'
<br><br>If I remove the Presence calls (just the gtk button), I don't get these errors. Any ideas? Thanks.<br><br><br>import gtk<br><br>from sugar.activity.Activity import Activity<br>from sugar.presence import PresenceService
<br>import logging<br><br>class crop(Activity):<br> def __init__(self):<br> Activity.__init__(self)<br><br> button = gtk.Button('Why am I busted?')<br> self.add(button)<br> button.show()<br>
<br> self._ps = PresenceService.get_instance()<br> me = self._ps.get_owner()<br> name = me.get_name()<br> logging.info("I am %s" % name)<br> activities = self._ps.get_activities()
<br> for act in activities:<br> logging.info("Activity: %s" % act.get_id())<br><br><br># # #<br><br>Traceback (most recent call last):<br> File "/root/sugars/09-05/sugar-jhbuild/build/share/sugar/shell/frame/BottomPanel.py", line 53, in __activity_clicked_cb
<br> self._shell.start_activity(icon.get_bundle_id())<br> File "/root/sugars/09-05/sugar-jhbuild/build/share/sugar/shell/Shell.py", line 163, in start_activity<br> activity = ActivityFactory.create(activity_type)
<br> File "/root/sugars/09-05/sugar-jhbuild/build/lib/python2.4/site-packages/sugar/activity/ActivityFactory.py", line 56, in create<br> xid = factory.create()<br> File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 25, in __call__
<br> ret = self._proxy_method (*args, **keywords)<br> File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 102, in __call__<br> reply_message = self._connection.send_with_reply_and_block(message, timeout)
<br> File "dbus_bindings.pyx", line 455, in dbus_bindings.Connection.send_with_reply_and_block<br>DBusException: Traceback (most recent call last):<br> File "/usr/lib/python2.4/site-packages/dbus/service.py", line 304, in _message_cb
<br> retval = candidate_method(self, *args, **keywords)<br> File "/root/sugars/09-05/sugar-jhbuild/build/lib/python2.4/site-packages/sugar/activity/ActivityFactory.py", line 42, in create<br> activity = self._class()
<br> File "/root/sugars/09-05/sugar-jhbuild/build/share/sugar/activities/crop/crop.py", line 19, in __init__<br> name = me.get_name()<br>AttributeError: 'NoneType' object has no attribute 'get_name'<br><br>Traceback (most recent call last):
<br> File "/root/sugars/09-05/sugar-jhbuild/build/share/sugar/shell/Shell.py", line 107, in __window_opened_cb<br> host = ActivityHost(self, window)<br> File "/root/sugars/09-05/sugar-jhbuild/build/share/sugar/shell/ActivityHost.py", line 24, in __init__
<br> self._type = self._activity.get_type()<br> File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 102, in __call__<br> reply_message = self._connection.send_with_reply_and_block(message, timeout)
<br> File "dbus_bindings.pyx", line 455, in dbus_bindings.Connection.send_with_reply_and_block<br>DBusException: Traceback (most recent call last):<br> File "/usr/lib/python2.4/site-packages/dbus/service.py", line 304, in _message_cb
<br> retval = candidate_method(self, *args, **keywords)<br> File "/root/sugars/09-05/sugar-jhbuild/build/lib/python2.4/site-packages/sugar/activity/Activity.py", line 52, in get_type<br> return self._activity.get_type()
<br> File "/root/sugars/09-05/sugar-jhbuild/build/lib/python2.4/site-packages/sugar/activity/Activity.py", line 97, in get_type<br> return self._activity_type<br>AttributeError: 'crop' object has no attribute '_activity_type'
<br>