<div>Hi all,</div><div><br></div><div>I'm running into an odd issue with the ReckonPrimer Activity some Austrian students have developed for our pilot project.</div><div><br></div><div>Starting the activity works fine on just about every software version I've tried but unfortunately fails on build 767 which is the one being used in the school at the moment (yes, I'm well aware that's quite outdated hence why I'm looking forward to 11.2.0 and its German support;-).</div>
<div><br></div><div>In the log it says "IOError: [Errno 13] Permission denied: '/home/olpc/Activities/ReckonPrimer.activity/data/Collection.data'" (for the complete log please see the end of this e-mail) whereby the offending function is in collection.py (.xo file available at <a href="http://derndorfer.eu/files/permanent/ReckonPrimer-7.xo" target="_blank">http://derndorfer.eu/files/permanent/ReckonPrimer-7.xo</a>):</div>
<div><br></div><div><div>    def set_data_in_pickle(self, root):</div><div>        """ Sets data in pickle file """</div><div>        path = os.path.join(os.getcwd(), "data/Collection.data")</div>


<div>        f = open(path, "wb")</div><div>        pickle.dump(root, f)</div><div>        f.close()</div></div><div><br></div><div>I really don't understand why this causes issues in 767 but none of the other (newer) software versions and I'd appreciate any pointers, thoughts or advice here. :-)</div>
<div><br></div><div>Thanks,<br>Christoph</div><div><br></div>--- log ---<br><br>reserved credentials (10002, 10003)<br>adding group: /usr/sbin/groupadd -o -g 10003 10003<br>groupadd: group 10003 exists<br>adding user: /usr/sbin/useradd -m -u 10002 -g 10003 -c org.laptop.ReckonPrimerActivity.10002 -d /home/olpc/isolation/1/uid_to_home_dir/10002 10002<br>

dropping privilege to (10002, 10003)<br>chdir to /home/olpc/Activities/ReckonPrimer.activity<br>umask(0)<br>about to execve<br>argv: dbus.Array([dbus.UTF8String('sugar-activity'), dbus.UTF8String('reckonprimeractivity.ReckonPrimerActivity'), dbus.UTF8String('-b'), dbus.UTF8String('org.laptop.ReckonPrimerActivity'), dbus.UTF8String('-a'), dbus.UTF8String('e87afe169311ef8a646ed22d22b3ef7781aeeed1')], signature=dbus.Signature('s'))<br>

env: dbus.Dictionary({dbus.UTF8String('LOGNAME'): dbus.UTF8String('olpc'), 'USER': '10002', dbus.UTF8String('HOME'): '/home/olpc/isolation/1/uid_to_home_dir/10002', dbus.UTF8String('PATH'): dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity/bin:/usr/share/sugar/activities/Journal.activity/bin:/usr/bin:/bin'), dbus.UTF8String('DISPLAY'): dbus.UTF8String(':0'), dbus.UTF8String('LANG'): dbus.UTF8String('en_US.UTF-8'), dbus.UTF8String('SHELL'): dbus.UTF8String('/bin/bash'), dbus.UTF8String('TZ'): dbus.UTF8String('UTC'), dbus.UTF8String('XDG_SESSION_COOKIE'): dbus.UTF8String('32b86eabf9f0f1c7f62b5e224da37272-1303944446.109383-65640594'), dbus.UTF8String('SESSION_MANAGER'): dbus.UTF8String('local/unix:@/tmp/.ICE-unix/1239,unix/unix:/tmp/.ICE-unix/1239'), dbus.UTF8String('SHLVL'): dbus.UTF8String('1'), dbus.UTF8String('ICEAUTHORITY'): '/home/olpc/isolation/1/uid_to_home_dir/10002/.ICEauthority', dbus.UTF8String('WINDOWPATH'): dbus.UTF8String('3'), dbus.UTF8String('SUGAR_BUNDLE_NAME'): dbus.UTF8String('Journal'), dbus.UTF8String('SUGAR_BUNDLE_PATH'): dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity'), dbus.UTF8String('SUGAR_LOCALEDIR'): dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity/locale'), dbus.UTF8String('SUGAR_THEME'): dbus.UTF8String('sugar-xo'), dbus.UTF8String('SUGAR_ACTIVITY_ROOT'): '/home/olpc/isolation/1/uid_to_home_dir/10002', dbus.UTF8String('GTK2_RC_FILES'): dbus.UTF8String('/usr/share/sugar/data/sugar-xo.gtkrc'), dbus.UTF8String('SUGAR_BUNDLE_ID'): dbus.UTF8String('org.laptop.ReckonPrimerActivity'), dbus.UTF8String('DBUS_SESSION_BUS_ADDRESS'): dbus.UTF8String('unix:path=/tmp/olpc-session-bus,guid=9a03f600feaf4414f793f3354db89cfe'), 'TMPDIR': '/home/olpc/isolation/1/uid_to_home_dir/10002/tmp', dbus.UTF8String('XAUTHORITY'): '/home/olpc/isolation/1/uid_to_home_dir/10002/.Xauthority', dbus.UTF8String('GTK_IM_MODULE'): dbus.UTF8String('gtk-im-context-simple'), dbus.UTF8String('XSERVERAUTH'): dbus.UTF8String('/var/tmp/olpc-auth/.Xserverauth'), dbus.UTF8String('PWD'): dbus.UTF8String('/home/olpc'), dbus.UTF8String('SUGAR_BUNDLE_VERSION'): dbus.UTF8String('99')}, signature=dbus.Signature('ss'))<br>

closing all fds but (1, 2)<br>{dbus.UTF8String('LOGNAME'): dbus.UTF8String('olpc'), 'USER': '10002', 'PATH': dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity/bin:/usr/share/sugar/activities/Journal.activity/bin:/usr/bin:/bin'), dbus.UTF8String('HOME'): '/home/olpc/isolation/1/uid_to_home_dir/10002', 'DISPLAY': dbus.UTF8String(':0'), 'LANG': dbus.UTF8String('en_US.UTF-8'), 'TERM': 'linux', dbus.UTF8String('SHELL'): dbus.UTF8String('/bin/bash'), dbus.UTF8String('TZ'): dbus.UTF8String('UTC'), 'XAUTHORITY': '/home/olpc/isolation/1/uid_to_home_dir/10002/.Xauthority', dbus.UTF8String('SESSION_MANAGER'): dbus.UTF8String('local/unix:@/tmp/.ICE-unix/1239,unix/unix:/tmp/.ICE-unix/1239'), dbus.UTF8String('SHLVL'): dbus.UTF8String('1'), 'ICEAUTHORITY': '/home/olpc/isolation/1/uid_to_home_dir/10002/.ICEauthority', dbus.UTF8String('WINDOWPATH'): dbus.UTF8String('3'), dbus.UTF8String('SUGAR_BUNDLE_NAME'): dbus.UTF8String('Journal'), dbus.UTF8String('SUGAR_BUNDLE_PATH'): dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity'), dbus.UTF8String('SUGAR_LOCALEDIR'): dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity/locale'), dbus.UTF8String('SUGAR_THEME'): dbus.UTF8String('sugar-xo'), 'UPSTART_JOB': 'rainbow', 'UPSTART_JOB_ID': '3', dbus.UTF8String('SUGAR_BUNDLE_ID'): dbus.UTF8String('org.laptop.ReckonPrimerActivity'), 'DBUS_SESSION_BUS_ADDRESS': dbus.UTF8String('unix:path=/tmp/olpc-session-bus,guid=9a03f600feaf4414f793f3354db89cfe'), 'TMPDIR': '/home/olpc/isolation/1/uid_to_home_dir/10002/tmp', dbus.UTF8String('XDG_SESSION_COOKIE'): dbus.UTF8String('32b86eabf9f0f1c7f62b5e224da37272-1303944446.109383-65640594'), dbus.UTF8String('GTK_IM_MODULE'): dbus.UTF8String('gtk-im-context-simple'), dbus.UTF8String('XSERVERAUTH'): dbus.UTF8String('/var/tmp/olpc-auth/.Xserverauth'), dbus.UTF8String('SUGAR_ACTIVITY_ROOT'): '/home/olpc/isolation/1/uid_to_home_dir/10002', dbus.UTF8String('PWD'): dbus.UTF8String('/home/olpc'), dbus.UTF8String('SUGAR_BUNDLE_VERSION'): dbus.UTF8String('99'), 'UPSTART_EVENT': 'started', 'GTK2_RC_FILES': dbus.UTF8String('/usr/share/sugar/data/sugar-xo.gtkrc')}<br>

1303944657.208344 WARNING root: Activity directory lacks a MANIFEST file.<br>/usr/lib/python2.5/site-packages/sugar/graphics/combobox.py:93: PangoWarning: error opening config file '/root/.pangorc': Permission denied<br>

<br>  self._model.append([action_id, text, pixbuf, False])<br>1303944663.328591 WARNING root: No gtk.AccelGroup in the top level window.<br>1303944663.368552 WARNING root: No gtk.AccelGroup in the top level window.<br>---------------------------------------------------------------------------<br>

IOError                                   Traceback (most recent call last)<br><br>/usr/lib/python2.5/site-packages/rainbow/service.py in CreateActivity(self=<rainbow.service.Rainbow at / at 0xb744c96c>, log_path=dbus.UTF8String('/home/olpc/.sugar/default/logs/org.laptop.ReckonPrimerActivity-1.log'), env=dbus.Dictionary({dbus.UTF8String('LOGNAME'): dbu...TF8String('99')}, signature=dbus.Signature('ss')), argv=dbus.Array([dbus.UTF8String('sugar-activity'), d...b3ef7781aeeed1')], signature=dbus.Signature('s')), bundle_path=dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity'), bundle_id=dbus.UTF8String('org.laptop.ReckonPrimerActivity'), success_cont=<function <lambda> at 0xb611109c>, error_cont=<function <lambda> at 0xb6111144>)<br>

    130                     os.dup2(log_fd, 2)<br>    131                     ret = inject.run(log, SPOOL, env, argv, env['SUGAR_BUNDLE_PATH'], pset, (1, 2),<br>--> 132                             env.get('RAINBOW_STRACE_LOG'), 500, 500, bundle_path, bundle_id, self.preloader_hint)<br>

        env.get = <built-in method get of dbus.Dictionary object at 0xb739b1dc><br>        bundle_path = dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity')<br>        bundle_id = dbus.UTF8String('org.laptop.ReckonPrimerActivity')<br>

        self.preloader_hint = True<br>    133                 except Exception, e:<br>    134                     util.trace()<br><br>/usr/lib/python2.5/site-packages/rainbow/inject.py in run(log=<function log at 0xb744f3e4>, spool='/home/olpc/isolation/1', env=dbus.Dictionary({dbus.UTF8String('LOGNAME'): dbu...TF8String('99')}, signature=dbus.Signature('ss')), argv=dbus.Array([dbus.UTF8String('sugar-activity'), d...b3ef7781aeeed1')], signature=dbus.Signature('s')), cwd=dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity'), pset=<rainbow.permissions.permlist.PermissionSet object at 0xb611054c>, safe_fds=(1, 2), strace_hint=None, owner_uid=500, owner_gid=500, bundle_path=dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity'), bundle_id=dbus.UTF8String('org.laptop.ReckonPrimerActivity'), preloader_hint=True)<br>

    353     check_bundle_path(uid, gid, bundle_path)<br>    354 <br>--> 355     launch(log, home, uid, gid, argv, env, cwd, pset, safe_fds, strace_hint, preloader_hint)<br>        global launch = <function launch at 0xb7653924><br>

        log = <function log at 0xb744f3e4><br>        home = '/home/olpc/isolation/1/uid_to_home_dir/10002'<br>        uid = 10002<br>        gid = 10003<br>        argv = dbus.Array([dbus.UTF8String('sugar-activity'), dbus.UTF8String('reckonprimeractivity.ReckonPrimerActivity'), dbus.UTF8String('-b'), dbus.UTF8String('org.laptop.ReckonPrimerActivity'), dbus.UTF8String('-a'), dbus.UTF8String('e87afe169311ef8a646ed22d22b3ef7781aeeed1')], signature=dbus.Signature('s'))<br>

        env = dbus.Dictionary({dbus.UTF8String('LOGNAME'): dbus.UTF8String('olpc'), 'USER': '10002', dbus.UTF8String('HOME'): '/home/olpc/isolation/1/uid_to_home_dir/10002', dbus.UTF8String('PATH'): dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity/bin:/usr/share/sugar/activities/Journal.activity/bin:/usr/bin:/bin'), dbus.UTF8String('DISPLAY'): dbus.UTF8String(':0'), dbus.UTF8String('LANG'): dbus.UTF8String('en_US.UTF-8'), dbus.UTF8String('SHELL'): dbus.UTF8String('/bin/bash'), dbus.UTF8String('TZ'): dbus.UTF8String('UTC'), dbus.UTF8String('XDG_SESSION_COOKIE'): dbus.UTF8String('32b86eabf9f0f1c7f62b5e224da37272-1303944446.109383-65640594'), dbus.UTF8String('SESSION_MANAGER'): dbus.UTF8String('local/unix:@/tmp/.ICE-unix/1239,unix/unix:/tmp/.ICE-unix/1239'), dbus.UTF8String('SHLVL'): dbus.UTF8String('1'), dbus.UTF8String('ICEAUTHORITY'): '/home/olpc/isolation/1/uid_to_home_dir/10002/.ICEauthority', dbus.UTF8String('WINDOWPATH'): dbus.UTF8String('3'), dbus.UTF8String('SUGAR_BUNDLE_NAME'): dbus.UTF8String('Journal'), dbus.UTF8String('SUGAR_BUNDLE_PATH'): dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity'), dbus.UTF8String('SUGAR_LOCALEDIR'): dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity/locale'), dbus.UTF8String('SUGAR_THEME'): dbus.UTF8String('sugar-xo'), dbus.UTF8String('SUGAR_ACTIVITY_ROOT'): '/home/olpc/isolation/1/uid_to_home_dir/10002', dbus.UTF8String('GTK2_RC_FILES'): dbus.UTF8String('/usr/share/sugar/data/sugar-xo.gtkrc'), dbus.UTF8String('SUGAR_BUNDLE_ID'): dbus.UTF8String('org.laptop.ReckonPrimerActivity'), dbus.UTF8String('DBUS_SESSION_BUS_ADDRESS'): dbus.UTF8String('unix:path=/tmp/olpc-session-bus,guid=9a03f600feaf4414f793f3354db89cfe'), 'TMPDIR': '/home/olpc/isolation/1/uid_to_home_dir/10002/tmp', dbus.UTF8String('XAUTHORITY'): '/home/olpc/isolation/1/uid_to_home_dir/10002/.Xauthority', dbus.UTF8String('GTK_IM_MODULE'): dbus.UTF8String('gtk-im-context-simple'), dbus.UTF8String('XSERVERAUTH'): dbus.UTF8String('/var/tmp/olpc-auth/.Xserverauth'), dbus.UTF8String('PWD'): dbus.UTF8String('/home/olpc'), dbus.UTF8String('SUGAR_BUNDLE_VERSION'): dbus.UTF8String('99')}, signature=dbus.Signature('ss'))<br>

        cwd = dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity')<br>        pset = <rainbow.permissions.permlist.PermissionSet object at 0xb611054c><br>        safe_fds = (1, 2)<br>        strace_hint = None<br>

        preloader_hint = True<br>    356 <br>    357 <br><br>/usr/lib/python2.5/site-packages/rainbow/inject.py in launch(log=<function log at 0xb744f3e4>, home='/home/olpc/isolation/1/uid_to_home_dir/10002', uid=10002, gid=10003, argv=dbus.Array([dbus.UTF8String('sugar-activity'), d...b3ef7781aeeed1')], signature=dbus.Signature('s')), env=dbus.Dictionary({dbus.UTF8String('LOGNAME'): dbu...TF8String('99')}, signature=dbus.Signature('ss')), cwd=dbus.UTF8String('/home/olpc/Activities/ReckonPrimer.activity'), pset=<rainbow.permissions.permlist.PermissionSet object at 0xb611054c>, safe_fds=(1, 2), strace_hint=None, preloader_hint=True)<br>

    291 <br>    292         from sugar.activity import main<br>--> 293         main.main()<br>        main.main = <function main at 0xb61114fc><br>    294     else:<br>    295         os.execvpe(argv[0], argv, env)<br>

<br>/usr/lib/python2.5/site-packages/sugar/activity/main.py in main()<br>    136         module.start()<br>    137 <br>--> 138     create_activity_instance(activity_constructor, activity_handle)<br>        global create_activity_instance = <function create_activity_instance at 0xb6111454><br>

        activity_constructor = <class 'reckonprimeractivity.ReckonPrimerActivity'><br>        activity_handle = <sugar.activity.activityhandle.ActivityHandle object at 0xb611f1cc><br>    139 <br>    140     gtk.main()<br>

<br>/usr/lib/python2.5/site-packages/sugar/activity/main.py in create_activity_instance(constructor=<class 'reckonprimeractivity.ReckonPrimerActivity'>, handle=<sugar.activity.activityhandle.ActivityHandle object at 0xb611f1cc>)<br>

     31 <br>     32 def create_activity_instance(constructor, handle):<br>---> 33     activity = constructor(handle)<br>        activity = undefined<br>        constructor = <class 'reckonprimeractivity.ReckonPrimerActivity'><br>

        handle = <sugar.activity.activityhandle.ActivityHandle object at 0xb611f1cc><br>     34     activity.show()<br>     35 <br><br>/home/olpc/Activities/ReckonPrimer.activity/reckonprimeractivity.py in __init__(self=<ReckonPrimerActivity object at 0xb611e054 (SugarActivity at 0x9dcd038)>, handle=<sugar.activity.activityhandle.ActivityHandle object at 0xb611f1cc>)<br>

     46         journal_object.destroy()<br>     47 <br>---> 48         self.run_session()<br>        self.run_session = <bound method ReckonPrimerActivity.run_session of <ReckonPrimerActivity object at 0xb611e054 (SugarActivity at 0x9dcd038)>><br>

     49 <br>     50 <br><br>/home/olpc/Activities/ReckonPrimer.activity/reckonprimeractivity.py in run_session(self=<ReckonPrimerActivity object at 0xb611e054 (SugarActivity at 0x9dcd038)>)<br>     50 <br>     51     def run_session(self):<br>

---> 52         session = Session("xo-user-name", self)<br>        session = undefined<br>        global Session = <class session.Session at 0xb612568c><br>        self = <ReckonPrimerActivity object at 0xb611e054 (SugarActivity at 0x9dcd038)><br>

     53         session.setMode("Learner")<br>     54         session.run()<br><br>/home/olpc/Activities/ReckonPrimer.activity/session.py in __init__(self=<session.Session instance at 0xb61343cc>, name='xo-user-name', window=<ReckonPrimerActivity object at 0xb611e054 (SugarActivity at 0x9dcd038)>)<br>

     20         self._learner = Learner(self._dis, self._co)<br>     21         self._author = Author()<br>---> 22         self._exstore = ExStore(self._dis, self._co)<br>        self._exstore = undefined<br>        global ExStore = <class exstore.ExStore at 0xb612559c><br>

        self._dis = <display.Display instance at 0xb613436c><br>        self._co = <coach.Coach instance at 0xb613428c><br>     23         #self._co.create_exercises() #TODO.WN091101 replace by storing Exerc.s<br>

     24         self._calcs = None #pop !<br><br>/home/olpc/Activities/ReckonPrimer.activity/exstore.py in __init__(self=<exstore.ExStore instance at 0xb613438c>, display=<display.Display instance at 0xb613436c>, coach=<coach.Coach instance at 0xb613428c>)<br>

    404 <br>    405         # comment to save changes (order of the items) till the next start<br>--> 406         self._root.set_data_in_pickle(self._root)<br>        self._root.set_data_in_pickle = <bound method Collection.set_data_in_pickle of <collection.Collection instance at 0xb613ad8c>><br>

        self._root = <collection.Collection instance at 0xb613ad8c><br>    407 <br>    408         #Provisorium für impl. "treeView-Kollektion" ^^^^^^^^^^^^^^^^^^^^<br><br>/home/olpc/Activities/ReckonPrimer.activity/collection.py in set_data_in_pickle(self=<collection.Collection instance at 0xb613ad8c>, root=<collection.Collection instance at 0xb613ad8c>)<br>

    148         """ Sets data in pickle file """<br>    149         path = os.path.join(os.getcwd(), "data/Collection.data")<br>--> 150         f = open(path, "wb")<br>

        f = undefined<br>        global open = undefined<br>        path = '/home/olpc/Activities/ReckonPrimer.activity/data/Collection.data'<br>    151         pickle.dump(root, f)<br>    152         f.close()<br>

<br>IOError: [Errno 13] Permission denied: '/home/olpc/Activities/ReckonPrimer.activity/data/Collection.data'<br><br>-- <br>Christoph Derndorfer<br>co-editor, olpcnews<br>url: <a href="http://www.olpcnews.com" target="_blank">www.olpcnews.com</a><br>

e-mail: <a href="mailto:christoph@olpcnews.com" target="_blank">christoph@olpcnews.com</a><br>