[Sugar-devel] "Permission denied" error in ReckonPrimer Activity

Christoph Derndorfer christoph.derndorfer at gmail.com
Wed Apr 27 20:14:59 EDT 2011


On Thu, Apr 28, 2011 at 1:36 AM, Walter Bender <walter.bender at gmail.com>wrote:

> On Wed, Apr 27, 2011 at 7:23 PM, Christoph Derndorfer
> <christoph.derndorfer at gmail.com> wrote:
> > Hi all,
> > I'm running into an odd issue with the ReckonPrimer Activity some
> Austrian
> > students have developed for our pilot project.
> > 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;-).
> > 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 http://derndorfer.eu/files/permanent/ReckonPrimer-7.xo):
> >     def set_data_in_pickle(self, root):
> >         """ Sets data in pickle file """
> >         path = os.path.join(os.getcwd(), "data/Collection.data")
> >         f = open(path, "wb")
> >         pickle.dump(root, f)
> >         f.close()
> > 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. :-)
> > Thanks,
> > Christoph
>
> '/home/olpc/Activities/ReckonPrimer.activity/data/Collection.data' is
> not writeable with Rainbow enabled. You should be using
> activity.get_activity_root() instead of os.getcwd().
>

Walter,

thanks so much for the quick reply, now everything seems to work the way
it's supposed to! :-)

Cheers,
Christoph

-- 
Christoph Derndorfer
co-editor, olpcnews
url: www.olpcnews.com
e-mail: christoph at olpcnews.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110428/945c5bc4/attachment.html>


More information about the Sugar-devel mailing list