System proxy setting vs. Pithos proxy setting

Bug #830255 reported by Daniel Brainard
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Pithos
In Progress
Undecided
Unassigned

Bug Description

Album art/ cover art does not show on pithos interface, just shows blank blue area where it should be.

Revision history for this message
robyshot (robyshot) wrote :

i have the same problem
it happened only after new installation of pithos (both in chakra and kubuntu)in an old installation of pithos images are displayed (those three computers use tor and privoxy with the same configuration to connect to pandora)

Revision history for this message
Markus Berndt (markus-berndt) wrote :

I have the same problem. I am using pithos through a proxy that is defined using the http_proxy environment variable. I took a quick look at the relevant function in the source and managed to fix it for my situation:

In the file /usr/bin/pithos change the function get_album_art as follows. The commented out line below is the original, while the line below the commented out one is new.

def get_album_art(url, proxy, *extra):
     proxies = {"http": proxy} if proxy else {};
     # content = urllib.urlopen(url, proxies=proxies).read()
     content = urllib.urlopen(url).read()
     l = gtk.gdk.PixbufLoader()
     l.set_size(ALBUM_ART_SIZE, ALBUM_ART_SIZE)
     l.write(content)
     l.close()
     return (l.get_pixbuf(),) + extra

When the environment variable http_proxy is set, proxy is empty, which results in proxies to equal {} which in turn trips up the urllib.urlopen method. It seems that proxy only has a value if it is set through pithos' settings menu.

On ubuntu 11.10, the http_proxy and https_proxy variables are set if one configures a proxy server as a system default through the system settings gui. Since the new authentication uses ssl, I need to go through the proxy for that, too, but I can only configure a proxy for http in the pithos settings. Leaving these settings blank, pithos picks up my system https proxy though, so I can use pithos.

(I am using pithos version 0.3.13, from the ppa on ubuntu 11.10).

Revision history for this message
Patwork (patwork) wrote :

It's funny, because Vince had the opposite problem:
bug: https://bugs.launchpad.net/pithos/+bug/608282
fix: http://bazaar.launchpad.net/~hacked/pithos/main/revision/65

After his patch I'm getting "IOError: [Errno url error] invalid proxy for http: xxx.xxx.xxx.xxx".

After changing urllib into urllib2 (with urllib2.ProxyHandler like in pithos/pandora/pandora.py) I'm getting "BadStatusLine" exception and no album art at all.

Revision history for this message
Patwork (patwork) wrote :
Adam Porter (alphapapa)
tags: added: needs-review patch
Changed in pithos:
status: New → In Progress
summary: - album art/ cover art
+ System proxy setting vs. Pithos proxy setting
Revision history for this message
Iestyn Guest (iguest) wrote :

This bug still exists in version 0.3.16.

Patching /usr/bin/pithos with the code here: http://bazaar.launchpad.net/~patwork/pithos/bugfix_830255/revision/182 corrects this problem.

It would be nice to get this patch into the main line so we don't have to figure out how to get the album art working again after every release.

How can I help move this along?

Thanks,

Kind regards,

Iestyn.

Revision history for this message
Patwork (patwork) wrote :

Slightly different approach to the problem:
https://github.com/kevinmehall/pithos/pull/2

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.