Opened 12 years ago

Closed 10 years ago

#3605 closed defect (fixed)

Details View broken for Documents folder

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

Description

In latest sugar mainline master, the Details View for the Documents folder is incomplete (at least the technical metadata is missing) and the following exception appears in the log:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gobject/__init__.py", line 101, in obj_set_property
    prop.setter(self, value)
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/journal/detailview.py", line 83, in set_metadata
    self._update_view()
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/journal/detailview.py", line 71, in _update_view
    self._expanded_entry.set_metadata(self._metadata)
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/journal/expandedentry.py", line 157, in set_metadata
    title.props.editable = model.is_editable(metadata)
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.7/site-packages/jarabe/journal/model.py", line 796, in is_editable
    return os.access(metadata['mountpoint'], os.W_OK)
TypeError: coercing to Unicode: need string or buffer, NoneType found

Change History (12)

comment:2 Changed 12 years ago by erikos

I am confused, is this a master issue or an dextrose one? If reproducible on master, can you give steps to reproduce on sugar master?

comment:3 Changed 12 years ago by ajay_garg

Following are the steps to reproduce the issue (on both master, and dextrose-without-the-patch) ::

a)
Ensure that the "Journal" and "Documents" (and "Shares" folder, if the Share-With-Many/1-to-N feature patch has been applied) are empty.

b)
Copy a file (I tried with a mp3) to a USB drive, from a non-XO machine.

c)
Insert the USB drive in the XO.

d)
Copy the file (of step b) ) to "Documents" folder.

e)
View Details of the copied entry (in "Documents").

f)
There should be the exception in the logs. Moreover, the "Description" field should be empty in the "Details View" (this field ought to be "/media/<name of USB drive>").

As already mentioned in the patch-description. the Batch-Operations patch (http://patchwork.sugarlabs.org/patch/1205/) must be applied, prior to applying this patch; else this patch won't apply cleanly.

comment:4 Changed 12 years ago by humitos

  • Cc humitos added

comment:5 Changed 12 years ago by humitos

I could reproduce this bug in XO 1.5 os9

comment:6 Changed 12 years ago by erikos

Thanks Ajay for the steps to reproduce. Can you rebase your patch for master that it is not depending on the Batch-Operations patch?

comment:7 Changed 12 years ago by ajay_garg

Posted the rebased patch (upon sugar-mainline) at ::

http://patchwork.sugarlabs.org/patch/1511/
http://patchwork.sugarlabs.org/patch/1512/
http://patchwork.sugarlabs.org/patch/1513/
http://patchwork.sugarlabs.org/patch/1514/
http://patchwork.sugarlabs.org/patch/1515/

I am sorry, that multiple copies have been created, since I got into a bit of mess while sending a patch for the first time from my F17-Beta VM. All patches are identical (with only a header difference between 1511/1512/1513 and 1514/1515; the patch code-contents are identical in all).

comment:8 Changed 12 years ago by humitos

Steps to apply and test this patch:

  1. Open Terminal Activity
  2. Remove all the entries into the Journal
    rm -rf ~/.sugar/default/datastore
    
  3. Reboot
  1. Open Terminal Activity
  2. Download the patch
    wget http://patchwork.sugarlabs.org/patch/1511/raw/ -O sugar-SL3605.patch
    
  3. Replace some string in the patch
    cat sugar-SL3605.patch | sed -s 's/src\///g' > sugar-SL3605.patch.new
    
  4. "cd" to the sugar source folder
    cd /usr/lib/python2.7/site-packages
    
  5. Apply the patch
    git apply ~/sugar-SL3605.patch.new
    
  6. Reboot

When the XO reboots, follow the steps mentioned by ajay: comment:3:ticket:3605.

I tested this patch on XO 1.5 os12 and it worked properly.

comment:9 Changed 11 years ago by dnarvaez

  • Component changed from journal to sugar

comment:10 Changed 11 years ago by dnarvaez

  • Milestone changed from 0.96 to Unspecified

comment:11 Changed 11 years ago by dnarvaez

  • Bug Status changed from New to Unconfirmed

comment:12 Changed 10 years ago by godiard

  • Resolution set to fixed
  • Status changed from accepted to closed

Working on 0.102

Note: See TracTickets for help on using tickets.