Pulling Albums explodes with KeyError: 'album_id'

Bug #722127 reported by Dario Ernst
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Viridian
Confirmed
Medium
Dave Eddy

Bug Description

After manually increasing the urllib timeout for connection to ampache and a successfull artist pull of 18k artists the album pull exploded with what it seems was a encoding error (oh, i myself also love en- and decoding stuff in python!)... and a (resulting?!) KeyError for album_id... traceback:

Plugins = {'pidgin_status': <pidgin_status.PidginPlugin instance at 0x89ed32c>, 'template': <template.TemplatePlugin instance at 0x89ed64c>}
--- Attempting to login to Ampache ---
Ampache = http://dyn.kanojo.de/ampache-git
Username = admin
Password = **********
Authentication Successful!
Authentication = 5509b0df6ba2e404184a0e5b896b1bd1
Number of artists = 14852
More than 5000 artists
Offset = 0
Offset = 5000

Offset = 10000
/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py:2958: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag 'Unknown' on line 1 char 18
  gtk.main_iteration()
/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py:2958: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag '歌:朝倉音夢' on line 1 char 91
  gtk.main_iteration()
/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py:2958: GtkWarning: Failed to set text from markup due to error parsing markup: Error on line 1 char 102: '歌:朝倉音夢&amp;芳野さくら' is not a valid name: '&'
  gtk.main_iteration()
/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py:2958: GtkWarning: Failed to set text from markup due to error parsing markup: Error on line 1 char 111: '歌:朝倉音夢&amp;芳野さくら' is not a valid name: '&'
  gtk.main_iteration()
/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py:2958: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag '歌:yozuca' on line 1 char 50
  gtk.main_iteration()
/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py:2958: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag '歌:CooRie' on line 1 char 86
  gtk.main_iteration()
/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py:2958: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag '歌:朝倉音夢' on line 1 char 69
  gtk.main_iteration()
/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py:2958: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag '歌:朝倉音夢' on line 1 char 79
  gtk.main_iteration()
/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py:2958: GtkWarning: Failed to set text from markup due to error parsing markup: Unknown tag '歌:CooRie' on line 1 char 106
  gtk.main_iteration()
Traceback (most recent call last):
  File "/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py", line 878, in main_gui_callback
    if self.login_and_get_artists("First"):
  File "/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py", line 1958, in login_and_get_artists
    self.check_and_populate_albums()
  File "/data/Sources/viridianplayer/AmpacheTools/AmpacheGUI.py", line 2879, in check_and_populate_albums
    list.append([album['artist_id'], album['album_id'], album['album_name'], album['album_year'], album['precise_rating']])
KeyError: 'album_id'

Revision history for this message
Dave Eddy (daveeddydotcom) wrote :

Confirmed. Encoding and decoding is awful business, but this should have been solved in my latest iteration. Are you using Viridian 1.2 or did you pull the code directly from launchpad? I think the newest revision should have fixed this.

btw 18k artists? that's insanity.. i'm glad Ampache can catalog it all for you!

Changed in viridianplayer:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Dave Eddy (daveeddydotcom)
Revision history for this message
Dario Ernst (n-launchpad-nebuk-de) wrote :

Hello,

thanks for the reply - i'm still waiting eagerly to be able to use viridian :).

As launchpad is quite confusing to me and i don't really know bzr (even worse: the bzr-launchpad-crosslink thingy) ... will i get that latest iteration via "bzr branch lp:viridianplayer", then just normally setup.py build that stuff in there (also - still had to fix urllib timeout manuall ... yes, 18K is much, also ampache is the only system i know that handles that database nicely. But with todays optimized software and fast hardware and networking i don't really see why this should be a problem?).

Back to topic - if that bzr command gives me that latest iteration i isn't fixed unfortuneatly - i get exactly the same errors.

Thank you for your help so far -
Kind Regards
- Dario Ernst

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.