Opened 10 years ago

Closed 10 years ago

Last modified 6 years ago

#1241 closed defect (fixed)

ObjectChooser displays USB media files, but fails to access file (datastore traceback)

Reported by: garycmartin Owned by: alsroot
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: Git as of bugdate
Severity: Major Keywords: r?
Cc: sascha_silbe Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Using the ObjectChooser to open a file from external USB media fails to open a selected file with the below (datastore) traceback. Tested with ImageViewer and Write (inserting an image) using latest sugar-jhbuild.

1251299807.015424 DEBUG root: ObjectChooser.__chooser_response_cb: dbus.String(u'/media/USB/misc file backups/Getting involved icons/Developer3.png')
1251299807.047768 DEBUG root: datastore.get
1251299807.050838 DEBUG root: dbus_helpers.get_properties: /media/USB/misc file backups/Getting involved icons/Developer3.png
Traceback (most recent call last):
  File "/home/garycmartin/sugar-jhbuild/install/share/sugar/activities/Write.activity/toolbar.py", line 186, in _image_cb
    chooser.pick(what=chooser.IMAGE, cb=cb)
  File "/home/garycmartin/sugar-jhbuild/install/share/sugar/activities/Write.activity/port/chooser.py", line 49, in pick
    jobject = chooser.get_selected_object()
  File "/home/garycmartin/sugar-jhbuild/install/lib/python2.6/site-packages/sugar/graphics/objectchooser.py", line 102, in get_selected_object
    return datastore.get(self._object_id)
  File "/home/garycmartin/sugar-jhbuild/install/lib/python2.6/site-packages/sugar/datastore/datastore.py", line 144, in get
    metadata = dbus_helpers.get_properties(object_id)
  File "/home/garycmartin/sugar-jhbuild/install/lib/python2.6/site-packages/sugar/datastore/dbus_helpers.py", line 78, in get_properties
    return _get_data_store().get_properties(uid, byte_arrays=True)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.IOError: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/home/garycmartin/sugar-jhbuild/install/lib/python2.6/site-packages/carquinyol/datastore.py", line 271, in get_properties
    metadata = self._metadata_store.retrieve(uid)
  File "/home/garycmartin/sugar-jhbuild/install/lib/python2.6/site-packages/carquinyol/metadatastore.py", line 39, in retrieve
    return metadatareader.retrieve(metadata_path, properties)
IOError: Couldn't open metadata directory /home/garycmartin/.sugar/default/datastore//m//media/USB/misc file backups/Getting involved icons/Developer3.png/metadata

Attachments (4)

sugar-1241-base.patch (1.2 KB) - added by alsroot 10 years ago.
sugar-1241-toolkit.patch (2.5 KB) - added by alsroot 10 years ago.
sugar-1241-toolkit.2.patch (1.5 KB) - added by alsroot 10 years ago.
sugar-1241-toolkit.3.patch (1.2 KB) - added by alsroot 10 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 10 years ago by sascha_silbe

  • Cc sascha_silbe added

comment:2 Changed 10 years ago by alsroot

  • Owner changed from tomeu to alsroot
  • Status changed from new to assigned

Changed 10 years ago by alsroot

Changed 10 years ago by alsroot

comment:3 Changed 10 years ago by alsroot

  • Component changed from sugar-datastore to sugar-toolkit
  • Keywords r? added

comment:4 Changed 10 years ago by alsroot

  • Owner changed from alsroot to tomeu

comment:5 Changed 10 years ago by alsroot

  • Milestone changed from Unspecified by Release Team to 0.86

comment:6 Changed 10 years ago by tomeu

  • Keywords r+ added; r? removed
  • Owner changed from tomeu to alsroot

Looks good to me, thanks a lot!

comment:8 Changed 10 years ago by alsroot

  • Keywords r? added; r+ removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Some activities relies on existing of ds fields like 'title'

Changed 10 years ago by alsroot

comment:9 Changed 10 years ago by tomeu

  • Keywords r+ added; r? removed
  • Status changed from reopened to assigned

Makes sense, you can see a bigger list of common properties here:

http://wiki.laptop.org/go/Low-level_Activity_API#Meta_Data

But activities shouldn't depend on any of them really being there.

comment:11 Changed 10 years ago by alsroot

  • Resolution fixed deleted
  • Status changed from closed to reopened

Changed 10 years ago by alsroot

comment:12 Changed 10 years ago by alsroot

  • Keywords r? added; r+ removed

To emulate missed parts of DSObject - optional file_path removing.

comment:14 Changed 6 years ago by dnarvaez

  • Component changed from sugar-toolkit to Sugar

comment:15 Changed 6 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.