Opened 13 years ago

Closed 13 years ago

#2501 closed defect (fixed)

ta fail loading project

Reported by: tonyforster Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Turtleart Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

0, ["start", 2.0], 195, 140, [null, 3?,
[1, ["userdefined", 0], 339, 268, [4, 2, 8]],
[2, ["number", "1000"], 397, 268, [1, null]],
[3, "forever", 195, 182, [0, 4, null]],
[4, "if", 278, 200, [3, 5, 1, null]],
[5, ["less2", 0], 325, 166, [4, 7, 6, null]],
[6, ["number", "3000"], 371, 208, [5, null]],
[7, "resistance", 371, 166, [5, null]],
[8, ["userdefined", 0], 339, 310, [1, 9, null]],
[9, ["number", "1100"], 397, 310, [8, null]],
[-1, ["turtle", "Tony"], 0, 0, 0, 0, 50, 5]]

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

main.main()

File "/usr/lib/python2.6/site-packages/sugar/activity/main.py", line 152, in main

create_activity_instance(activity_constructor, activity_handle)

File "/usr/lib/python2.6/site-packages/sugar/activity/main.py", line 37, in create_activity_instance

activity = constructor(handle)

File "/home/olpc/Activities/TurtleArt.activity/TurtleArtActivity.py", line 125, in init

self._setup_canvas(canvas)

File "/home/olpc/Activities/TurtleArt.activity/TurtleArtActivity.py", line 917, in _setup_canvas

self.read_file(self._jobject.file_path)

File "/home/olpc/Activities/TurtleArt.activity/TurtleArtActivity.py", line 974, in read_file

self.tw.load_files(file_path, run_it)

File "/home/olpc/Activities/TurtleArt.activity/TurtleArt/tawindow.py", line 2262, in load_files

self._check_collapsibles(self.process_data(data_from_file(ta_file)))

File "/home/olpc/Activities/TurtleArt.activity/TurtleArt/tawindow.py", line 1138, in process_data

blocks.append(self.load_block(blk, offset))

File "/home/olpc/Activities/TurtleArt.activity/TurtleArt/tawindow.py", line 2343, in load_block

self.load_python_code_from_journal(datastore.get(value), blk)

File "/usr/lib/python2.6/site-packages/sugar/datastore/datastore.py", line 289, in get

if object_id.startswith('/'):

AttributeError: 'int' object has no attribute 'startswith'
Exited with status 1, pid 818 data (None, <open file '<fdopen>', mode 'w' at 0x9489de0>, dbus.ByteArray('f0fcc734fea62c1312c5934bb771a5d5efcec1ff', variant_level=1))

Attachments (1)

TurtleArt-104.xo (999.1 KB) - added by walter 13 years ago.
a more robust version of the patch

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by walter

OK. I think I see what is going on, Was this an old project? I'll test for ["userdefined", 0], which is a depreciated format.

comment:2 Changed 13 years ago by tonyforster

yes, a 103 project opened in 104

comment:3 Changed 13 years ago by walter

I think the attached (v104) will fix this problem.

comment:4 Changed 13 years ago by walter

  • Status changed from new to assigned

comment:5 Changed 13 years ago by tonyforster

still quits

1290248860.059253 DEBUG TurtleArt: Set Sensor Type to sound
Simple mixer control 'DC Mode Enable',0

Capabilities: pswitch pswitch-joined penum
Playback channels: Mono
Mono: Playback [off]

Terminated by signal 11, pid 3001 data (None, <open file '<fdopen>', mode 'w' at 0x952fc00>, dbus.ByteArray('0d6aa6696683d5da8b31719e790e2a5b7dff2d78', variant_level=1))

Changed 13 years ago by walter

a more robust version of the patch

comment:6 Changed 13 years ago by walter

I was a bit sloppy in my earlier patch. This version should be more thorough. Meanwhile, I am getting segfaults from the sensor blocks... a separate regression of some sort. Try testing this code using something other than a sensor block and I think this bug is now fixed.

comment:7 Changed 13 years ago by walter

I'm tracking the problem with sensors and multimedia in #1613 (I'm closing this ticket because the issue is not seemingly related to Python blocks.)

comment:8 Changed 13 years ago by walter

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.