Ticket #976 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

favoritesview.py: icon-color KeyError

Reported by: sascha_silbe Owned by: alsroot
Priority: High Milestone: 0.86
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) (diff)

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

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

Change History

Changed 4 years ago by sascha_silbe

complete shell.log including this and other errors

follow-up: ↓ 2   Changed 4 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).

in reply to: ↑ 1   Changed 4 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?

  Changed 4 years ago by eben

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

  Changed 4 years ago by tomeu

  • priority changed from Unspecified by Maintainer to High

Changed 4 years ago by alsroot

  Changed 4 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).

  Changed 4 years ago by erikos

  • status_field 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

  Changed 4 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.

  Changed 4 years ago by alsroot

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