Opened 11 years ago

Closed 11 years ago

Last modified 7 years ago

#976 closed defect (fixed)

favoritesview.py: icon-color KeyError

Reported by: sascha_silbe Owned by: alsroot
Priority: High Milestone:
Component: Sugar Version: Git as of bugdate
Severity: Major Keywords: r+
Cc: eben, garycmartin Distribution/OS: Unspecified
Bug Status: Assigned

Description (last modified by tomeu)

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 578, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-packages/jarabe/desktop/favoritesview.py", line 383, in <lambda>
    entries, total_count, callback_cb)
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-packages/jarabe/desktop/favoritesview.py", line 394, in __reply_handler_cb
    callback_cb(entries)
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-packages/jarabe/desktop/favoritesview.py", line 458, in __get_last_activity_async_cb
    self._update()
  File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-packages/jarabe/desktop/favoritesview.py", line 467, in _update
    self.props.xo_color = XoColor(first_entry['icon-color'])
KeyError: 'icon-color'

This probably was the cause for
a) this system disappearing from the neighborhood/group view of another system and
b) the (own) buddy icon on neighborhood view (but not group view) not reacting to right click anymore.

Attachments (2)

shell.log (363.1 KB) - added by sascha_silbe 11 years ago.
complete shell.log including this and other errors
sugar-976.patch (8.0 KB) - added by alsroot 11 years ago.

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by sascha_silbe

complete shell.log including this and other errors

comment:1 follow-up: Changed 11 years ago by sascha_silbe

This probably happens on an entry imported with copy-to-journal. I might also have manually created some metadata (but not icon-color) for the entry to be recognized by Turtle Art.
Nevertheless the shell shouldn't traceback on a missing color attribute (default probably should be the owners colors).

comment:2 in reply to: ↑ 1 Changed 11 years ago by tomeu

  • Cc eben garycmartin added
  • Description modified (diff)

Replying to sascha_silbe:

This probably happens on an entry imported with copy-to-journal. I might also have manually created some metadata (but not icon-color) for the entry to be recognized by Turtle Art.
Nevertheless the shell shouldn't traceback on a missing color attribute (default probably should be the owners colors).

Agreed, maybe Gary and/or Eben want to comment about what colors to use when the metadata property is missing?

comment:3 Changed 11 years ago by eben

Yes, using the owner's colors seems to be the only logical choice we have.

comment:4 Changed 11 years ago by tomeu

  • Priority changed from Unspecified by Maintainer to High

Changed 11 years ago by alsroot

comment:5 Changed 11 years ago by alsroot

  • Keywords r? added

Attached patch tries to use 'icon-color' metadata property and uses owners colors otherwise(except colors for bundles).

comment:6 Changed 11 years ago by erikos

  • Bug Status changed from Unconfirmed to Assigned

The patch looks good to me. Sasche can you add an executable test case and verify Aleksey's patch.

Thanks

comment:7 Changed 11 years ago by tomeu

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

r+ but gettext is a module part of the python std lib so goes in the first group of imports.

comment:8 Changed 11 years ago by alsroot

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

comment:9 Changed 7 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.