coherence-project / Coherence

DLNA/UPnP Media Server and Framework for the Digital Living
MIT License
171 stars 52 forks source link

Coherence with Ampache not working #17

Closed konilabs closed 10 years ago

konilabs commented 10 years ago

Hello Team, I am using Coherence 0.6.6.2 with Ampache 3.7.0. I established the connection between the two parts.

I can see Tags list in Upnp webserver but every other links throws a python exception

<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'text'
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py, line 551 in _runCallbacks
549          current._runningCallbacks = True
550          try:
551            current.result = callback(current.result, *args, **kw)
552          finally:
/usr/lib/python2.7/dist-packages/coherence/backends/ampache_storage.py, line 767 in got_response
765        for q in response.findall(query_item):
766          if query_item in ('song',):
767            items.append(Track(self,q))
768          if query_item in ('artist',):
/usr/lib/python2.7/dist-packages/coherence/backends/ampache_storage.py, line 415 in __init__
413    self.artist = element.find('artist').text
414    self.album = element.find('album').text
415    self.genre = element.find('genre').text
416    self.track_nr = element.find('track').text

<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'text'

Could you help ?

htgoebel commented 10 years ago

This looks like the ampache-XML is not as expected (and documented). To solve this, I need ampache response causing the error. Please get the newest version from branch fix/ampache (https://github.com/coherence-project/Coherence/archive/fix/ampache.zip) and try that. Please mail me all the output, esp. the part in front of the traceback.

konilabs commented 10 years ago

I did the past for Content / All tracks : http://pastebin.com/8Tddg5mm All other weblinks in Upnp webserver are not working either.

htgoebel commented 10 years ago

Thanks for the pastbin. I just fixed this issue. Please try branch maintain/0.6.x

konilabs commented 10 years ago

Hello,

Sorry but the issue is not corrected. I still have some issues when clicking any link under content except "Tags" and "Playlist"

web.Server Traceback (most recent call last): exceptions.AttributeError: 'NoneType' object has no attribute 'decode' /usr/local/lib/python2.7/dist-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py:577 in _runCallbacks 576 try: 577 current.result = callback(current.result, _args, *_kw) 578 if current.result is current: /usr/local/lib/python2.7/dist-packages/Coherence-0.6.7-py2.7.egg/coherence/upnp/devices/media_server.py:419 in build_page 418 else: 419 title = title.decode('utf-8').encode('ascii', 'xmlcharrefreplace') 420 except (UnicodeEncodeError, UnicodeDecodeError): exceptions.AttributeError: 'NoneType' object has no attribute 'decode'