Confusing behavior if no collection is installed

Bug #992809 reported by Rafał Cieślak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Accomplishments Daemon
Fix Released
Low
Rafał Cieślak
Ubuntu Accomplishments Viewer
Fix Released
Medium
Unassigned

Bug Description

The daemon crashes if no accomplishments collection is installed:

exceptions.OSError: [Errno 2] No such file or directory: '/usr/share/accomplishments/accomplishments/'

It should instead show an error message, and maybe a suggestion that it is recommended to install at least ubuntu-community-accomplishments.

Tags: bitesize
Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

The 0.2 newAPI daemon does not crash anymore in such case. However, the viewer might indeed display a warning in this case.

Changed in ubuntu-accomplishments-daemon:
milestone: none → 0.2
assignee: nobody → Rafal Cieślak (rafalcieslak256)
status: Confirmed → Fix Committed
Changed in ubuntu-accomplishments-viewer:
importance: Undecided → Wishlist
summary: - The daemon crashes if no accomplishments collection is installed
+ Confusing behavior if no collection is installed
Jono Bacon (jonobacon)
Changed in ubuntu-accomplishments-viewer:
status: New → Confirmed
importance: Wishlist → Medium
milestone: none → 0.2
Jono Bacon (jonobacon)
Changed in ubuntu-accomplishments-daemon:
status: Fix Committed → Fix Released
Jono Bacon (jonobacon)
Changed in ubuntu-accomplishments-viewer:
milestone: 0.2 → 0.3
tags: added: bitesize
Revision history for this message
Jono Bacon (jonobacon) wrote :

I have added a message to resolve this bug, but I want to have a more elegant solution in which you can click a scan button to have the daemon rescan the collection. The challenge is that I don't think we currently have a means to do this - I could run _load_accomplishments() but if the daemon is not restarted, it doesn't do a rescan of the accomplishments collections.

Changed in ubuntu-accomplishments-viewer:
status: Confirmed → Fix Committed
Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

Calling API's reload_accom_database() should do the trick. It should rescan all directories for accomplishments and load a new database.

Revision history for this message
Rafał Cieślak (rafalcieslak256) wrote :

Alright, I implemented this. Clicking "Scan again" on the message will reload accomplishment collections, same for a new Edit menu item "Reload accomplishment collections" <- that's the one that may be useful for accomplishment contributors, they won't need to restart the daemon anymore :-) Also, there is a statusbar message when reloading takes place, either to inform the user that the daemon is rescanning collections, or to ask him to wait a second.

Changed in ubuntu-accomplishments-viewer:
assignee: nobody → Rafal Cieślak (rafalcieslak256)
assignee: Rafal Cieślak (rafalcieslak256) → nobody
Changed in ubuntu-accomplishments-viewer:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.