Exception when opening MyPlex

When I try to open MyPlex in Plexconnect an exception occurs. Was it supposed to work already?

This is what comes by in the output

 

 

 

 

21:51:25 WebServer: serving .xml: /myplex

21:51:25 XMLConverter: XML_ExpandNode - Error in cmd ADDXML, line 

    

    

    {{VAR(sections:NoKey:FALSE)}}  

    

    

Traceback (most recent call last):

  File "/Users/peter/PlexConnect/XMLConverter.py", line 489, in XML_ExpandNode

    res = getattr(g_CommandCollection, 'TREE_'+cmd)(elem, child, src, srcXML, param)

  File "/Users/peter/PlexConnect/XMLConverter.py", line 804, in TREE_ADDXML

    PMS = PlexAPI.getXMLFromMultiplePMS(UDID, path, type, self.options)

  File "/Users/peter/PlexConnect/PlexAPI.py", line 363, in getXMLFromMultiplePMS

    XML = getXMLFromPMS(baseURL, path, options, token)

  File "/Users/peter/PlexConnect/PlexAPI.py", line 295, in getXMLFromPMS

    response = urllib2.urlopen(request)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen

    return _opener.open(url, data, timeout)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 404, in open

    response = self._open(req, data)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 422, in _open

    '_open', req)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain

    result = func(*args)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1214, in http_open

    return self.do_open(httplib.HTTPConnection, req)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1187, in do_open

    r = h.getresponse(buffering=True)

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1045, in getresponse

    response.begin()

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 409, in begin

    version, status, reason = self._read_status()

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 373, in _read_status

    raise BadStatusLine(line)

BadStatusLine: ''

 

21:51:25 XMLConverter: XML_ExpandNode - Error in cmd COPY, line 

          

            

            

Traceback (most recent call last):

  File "/Users/peter/PlexConnect/XMLConverter.py", line 489, in XML_ExpandNode

    res = getattr(g_CommandCollection, 'TREE_'+cmd)(elem, child, src, srcXML, param)

  File "/Users/peter/PlexConnect/XMLConverter.py", line 739, in TREE_COPY

    src, srcXML, tag = self.getBase(src, srcXML, tag)

  File "/Users/peter/PlexConnect/XMLConverter.py", line 677, in getBase

    src = self.PMSroot[srcXML]

KeyError: 'MyPlexSections'

 

21:51:25 XMLConverter: XML_ExpandNode - Error in cmd COPY, line 

              

              {{VAR(sections:NoKey:TRUE)}}  

                

Traceback (most recent call last):

  File "/Users/peter/PlexConnect/XMLConverter.py", line 489, in XML_ExpandNode

    res = getattr(g_CommandCollection, 'TREE_'+cmd)(elem, child, src, srcXML, param)

  File "/Users/peter/PlexConnect/XMLConverter.py", line 753, in TREE_COPY

    for elemSRC in src.findall(tag):

AttributeError: 'NoneType' object has no attribute 'findall'

>> Was it supposed to work already?

Yes... I can confirm I already used it.

Ah ok, then I am curious what is causing the exception on my system

Ah, I found something, I also tried Cloud syncing, now I have removed that and the crash does not occur anymore and I see other servers as well. Maybe that helps finding the problem

Me too. Will need more details though: Version/download date, python version, OS, ... basically everything in "How to report an issue...".

Cloud syncing is new (beta) option in PMS You can sync a movie/serie to a cloud service like dropbox or copy.com The movie will automatically be converted just like local syncing to a device. This cloud syncing will behave like a PMS server so it will also show up as a seperate PMS server in the MyPlex list.

I've looked into the code what could be the problem and I think I found it. The cloud sync pms is available at https://my.plexapp.com:443 but Plexconnect is trying to open the url at http://my.plexapp.com:443

At several places in XMLConverter.py the code

is being used and now there is http hardcoded which goes wrong for the https url of cloudsync

>> there is http hardcoded

Room for improvement... :-D

>> there is http hardcoded

Room for improvement... :-D

The problem is how to determine if you need https or http

You can't know for sure by looking at the port only or is the info perhaps avaiable in the MyPlex api where the addresses of the PMS'es are being retrieved?

-> https://my.plexapp.com/pms/servers

We got it all! :-)

-> https://my.plexapp.com/pms/servers

We got it all! :-)

Yep, I found it already. I now can open the Cloud Sync PMS as well ;) It is only not yet playing, going to dig further ;-)

-> https://my.plexapp.com/pms/servers

We got it all! :-)

I implemented it in a fork. Hope you can merge it in the mainbranch. https for MyPlex server is now working correctly

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.