On Thu, Apr 28, 2011 at 1:36 AM, Walter Bender <walter.ben...@gmail.com>wrote:
> On Wed, Apr 27, 2011 at 7:23 PM, Christoph Derndorfer > <christoph.derndor...@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: christ...@olpcnews.com
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel