Bug#801136: mpd-sima: Troublesome with proxies

Chris Chiappa chris+debian at chiappa.net
Tue Oct 6 15:46:22 UTC 2015

Package: mpd-sima
Version: 0.13.1-1
Severity: normal

Behind a proxy, I've found it very difficult to get mpd-sima to use it
for last.fm access.  python-requests documentation at
http://docs.python-requests.org/en/latest/ says it should pay
attention to the HTTP_PROXY and HTTPS_PROXY environment variables.  I
created /etc/systemd/system/mpd-sima.service.d/override.conf


and restarted mpd-sima.  In /proc/<pid>/environ I can see both
environment variables, but from both strace and mpd-sima's log I can
see that it's failing to connect to last.fm.  I was able to get it to
work by hacking fetch_ws in http.py and manually specifying proxies:

        def fetch_ws(self, prepreq):
            proxies = {
                "http"  : "http://proxy.company.com:80",
                "https" : "http://proxy.company.com:80"
            """fetch from web service"""
            sess = Session()
            sess.proxies = proxies
            resp = sess.send(prepreq, timeout=SOCKET_TIMEOUT)

but that's obviously not the right way to do it.  Not being a python
hacker I'm not sure how to tell why the envrironment variables aren't
working, but it seems like having some better way of configuring
proxies might be desirable anyhow.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mpd-sima depends on:
ii  adduser              3.113+nmu3
ii  init-system-helpers  1.23
ii  lsb-base             9.20150917
ii  python3              3.4.3-6
ii  python3-musicpd      0.4.1-1
ii  python3-requests     2.7.0-3
pn  python3:any          <none>

mpd-sima recommends no packages.

Versions of packages mpd-sima suggests:
ii  mpd  0.19.10-1+b3

-- Configuration Files:
/etc/default/mpd-sima changed:

/etc/mpd-sima.cfg [Errno 13] Permission denied: u'/etc/mpd-sima.cfg'

-- no debconf information

More information about the pkg-multimedia-maintainers mailing list