HELP! Can't get PlexConnect working OSX > ATV3/ATV2

Hi team
For some reason, on a recent upgrade of PMS and a reboot, I can’t for the life of me get PlexConnect to work on my ATV3 or multiple ATV2’s

On the ATV (any) the PlexConnect “Trailers” webpage displays, and it shows that I am logged on to my PMS, with my one user account (I deleted all the other “Home” user accounts, just to test this - didn’t alter the outcome a jot)

The problem is - no content displays on the Library heading (or any of the others - other than Settings). It just has the error “No Plex Library sections available” - but the PMS is running fine and I can run the media on my Mac or via the Plex Web client (or via the Android or iOS apps)

Here is my PlexConnect logfile link on pastebin: http://pastebin.com/yK27avGy

I have PMS and PC installed on the one Mac mini. It’s IP address is 192.168.1.51

The Mac mini has OS X Yosemite 10.10.5 installed

The PMS server is v0.9.12.11

The PlexConnect has only just been installed on the Mac Mini (I did have it running on a QNAP (it has a hardware fault and is off the repair shop)). I installed it on 11th July, 2015. I am using the master branch

My Settings.cfg is:
[PlexConnect]
enable_plexgdm = False
ip_pms = 192.168.1.51
port_pms = 32400
enable_dnsserver = True
port_dnsserver = 53
ip_dnsmaster = 8.8.8.8
prevent_atv_update = True
enable_plexconnect_autodetect = True
ip_plexconnect = 0.0.0.0
hosttointercept = trailers.apple.com
port_webserver = 80
enable_webserver_ssl = True
port_ssl = 443
certfile = ./assets/certificates/trailers.pem
allow_gzip_atv = False
allow_gzip_pmslocal = False
allow_gzip_pmsremote = True
loglevel = High
logpath = .

The main error, out of the log, seems to be this (from line#100 to 128):

23:50:21 WebServer: Internal Server Error:
Traceback (most recent call last):
File “/Applications/PlexConnect-master/WebServer.py”, line 229, in do_GET
XML = XMLConverter.XML_PMS2aTV(PMSaddress, self.path + query, options)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 317, in XML_PMS2aTV
PlexAPI.discoverPMS(UDID, g_param[‘CSettings’], g_param[‘IP_self’], tokenDict)
File “/Applications/PlexConnect-master/PlexAPI.py”, line 249, in discoverPMS
XML = getXMLFromPMS(‘http://’+ip+’:’+port, ‘/servers’, None, ‘’)
File “/Applications/PlexConnect-master/PlexAPI.py”, line 377, in getXMLFromPMS
response = urllib2.urlopen(request, timeout=20)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 154, in urlopen
return opener.open(url, data, timeout)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 431, in open
response = self._open(req, data)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 449, in _open
‘_open’, req)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 409, in _call_chain
result = func(*args)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py”, line 1227, 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 1200, in do_open
r = h.getresponse(buffering=True)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 1132, in getresponse
response.begin()
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 453, in begin
version, status, reason = self._read_status()
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py”, line 417, in _read_status
raise BadStatusLine(line)
BadStatusLine: ‘’

I hope you can help!

Cheers, Ben

Try to update Python from the official site. It should b 2.7.10 or higher the latest version for OS X. Don’t update over 3.x. Once complete restart plexconnect and see if the issue persists.

Here is a link:

Likely you will want the 64bit or 32/64 bit dmg or pkg.

Thanks @wahlman.j
I figured out that I had set (silly me) PMS to use IPv6. I don’t remember doing it - but turned that off (given that I am still running IPv4 at home) and it worked.

By the way - I do have Python 2.7 installed and it was only done in the last 6 weeks (so fairly up-to-date)

BUT: I do now have another issue - and it looks like it is related to the PlexAPI.py file

Instead of trying to identify the issue - I thought that I would completely re-install PlexConnect (cloned in the Git and copied the output into the PlexConnect-master folder). Which is what I did

Here is the log:

16:37:21 PlexConnect: started: 16:37:21
16:37:21 PlexConnect: Version: 0.5-dev-020615
16:37:21 PlexConnect: Python: 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
16:37:21 PlexConnect: Host OS: darwin
16:37:21 PlexConnect: PILBackgrounds: Is PIL installed? False
16:37:21 PlexConnect: IP_self: 192.168.1.51
16:37:21 DNSServer: started: 16:37:21
16:37:21 DNSServer: ***
16:37:21 DNSServer: DNSServer: Serving DNS on 192.168.1.51 port 53.
16:37:21 DNSServer: ***
16:37:21 WebServer: started: 16:37:21
16:37:21 WebServer: ***
16:37:21 WebServer: WebServer: Serving HTTP on 192.168.1.51 port 80.
16:37:21 WebServer: ***
16:37:21 WebServer: started: 16:37:21
16:37:21 WebServer: ***
16:37:21 WebServer: WebServer: Serving HTTPS on 192.168.1.51 port 443.
16:37:21 WebServer: ***
16:37:40 ATVSettings: add section C07NDUUXFF54
16:37:40 PlexAPI: ***
16:37:40 PlexAPI: looking up Plex Media Server
16:37:40 PlexAPI: ***
16:37:41 PlexAPI: GDM: Servers discovered: 1
16:37:41 PlexAPI: Servers (local, plex.tv, MyPlex): 2
16:38:13 PlexAPI: ***
16:38:13 PlexAPI: looking up Plex Media Server
16:38:13 PlexAPI: ***
16:38:14 PlexAPI: GDM: Servers discovered: 1
16:38:14 PlexAPI: Servers (local, plex.tv, MyPlex): 2
16:38:41 PlexAPI: MyPlex Sign In successfull
16:38:41 PlexAPI: ***
16:38:41 PlexAPI: looking up Plex Media Server
16:38:41 PlexAPI: ***
16:38:42 PlexAPI: GDM: Servers discovered: 1
16:38:43 PlexAPI: Servers (local, plex.tv, MyPlex): 2
16:38:55 XMLConverter: XML_ExpandNode - Error in cmd ADDXML, line

{{ADDXML(RecentlyReleased::newest)}}

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

Traceback (most recent call last):
File “/Applications/PlexConnect-master/XMLConverter.py”, line 489, in XML_ExpandNode
res = getattr(CommandCollection, ‘TREE_’+cmd)(elem, child, src, srcXML, param)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 889, in TREE_ADDXML
PMS = PlexAPI.getXMLFromPMS(self.PMS_baseURL, path, self.options, auth_token, enableGzip)
File “/Applications/PlexConnect-master/PlexAPI.py”, line 397, in getXMLFromPMS
XML = etree.parse(response)
File “”, line 62, in parse
File “”, line 38, in parse
ParseError: not well-formed (invalid token): line 1353, column 235

16:38:55 XMLConverter: XML_ExpandNode - Error in cmd CUT, line

Traceback (most recent call last):
File “/Applications/PlexConnect-master/XMLConverter.py”, line 489, in XML_ExpandNode
res = getattr(CommandCollection, ‘TREE_’+cmd)(elem, child, src, srcXML, param)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 857, in TREE_CUT
key, leftover, dfltd = self.getKey(src, srcXML, param)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 626, in getKey
el, srcXML, attrib = self.getBase(src, srcXML, attrib)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 684, in getBase
src = self.PMSroot[srcXML]
KeyError: ‘RecentlyAdded’

16:38:55 XMLConverter: XML_ExpandNode - Error in cmd CUT, line

Traceback (most recent call last):
File “/Applications/PlexConnect-master/XMLConverter.py”, line 489, in XML_ExpandNode
res = getattr(CommandCollection, ‘TREE_’+cmd)(elem, child, src, srcXML, param)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 857, in TREE_CUT
key, leftover, dfltd = self.getKey(src, srcXML, param)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 626, in getKey
el, srcXML, attrib = self.getBase(src, srcXML, attrib)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 684, in getBase
src = self.PMSroot[srcXML]
KeyError: ‘RecentlyAdded’

16:38:55 XMLConverter: XML_ExpandNode - Error in cmd COPY, line

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

Traceback (most recent call last):
File “/Applications/PlexConnect-master/XMLConverter.py”, line 489, in XML_ExpandNode
res = getattr(CommandCollection, ‘TREE_’+cmd)(elem, child, src, srcXML, param)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 746, in TREE_COPY
src, srcXML, tag = self.getBase(src, srcXML, tag)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 684, in getBase
src = self.PMSroot[srcXML]
KeyError: ‘RecentlyAdded’

16:39:00 WebServer: Internal Server Error:
Traceback (most recent call last):
File “/Applications/PlexConnect-master/WebServer.py”, line 229, in do_GET
XML = XMLConverter.XML_PMS2aTV(PMSaddress, self.path + query, options)
File “/Applications/PlexConnect-master/XMLConverter.py”, line 376, in XML_PMS2aTV
PMS = PlexAPI.getXMLFromPMS(PMS_baseURL, path, options, auth_token, enableGzip)
File “/Applications/PlexConnect-master/PlexAPI.py”, line 397, in getXMLFromPMS
XML = etree.parse(response)
File “”, line 62, in parse
File “”, line 38, in parse
ParseError: not well-formed (invalid token): line 5437, column 235


As I noted above, the media files were all on a QNAP, but I have moved that data onto 2 USB-connected HDD’s, so PMS rebuilt the libraries (everything came in as “Recently Added”)

On the ATV3 I am only getting a Plex logo (a Plex coloured clapperboard) icon under “Recently Added” that when I either attempt to “play” or open, it comes up with a “Plex is Unavailable” error - but I can open other files.

Basically, other than from Search or the “Recently Released” ticker on the bottom of the “On Deck” page for Movies, I cannot open any other pages (eg: “All Movies”, “Decades” etc). I get the ATV spinning lines, with “Accessing Trailers” and it never ends (nor loads any content whatsoever)

I have also deleted the ATV profile and reloaded the certificate. I turned off (pulled the power plug) the ATV for 5-10 mins and restarted. I removed the manual DNS settings, opened Trailers (yes, it went to Apples Trailers app) and then reset the DNS again.

I am out of ideas! I have replaced everything that I can think of and that I have skills to deal with.

Any ideas / thoughts?? I appreciate the help

With “loglevel=High” and the produced log attached (not copied into the email) we would actually be the delivered PMS XML and be able to pinpoint to the issue…

ParseError: not well-formed (invalid token): line 1353, column 235

I have no idea, why PMS would deliver a “bad” XML.

Hi @baa thanks for the response

Sorry about the log - in the replacing of PlexConnect, I forgot to change that in Settings - my bad!

I have stopped PlexConnect, deleted the log, restarted and clicked back into Trailers on my ATV3.

Interestingly, the “Recently Added” now has the artwork for the last movies that I did add to the library.

But, “All Movies” is still spinning, with “Accessing Trailers” and no artwork loading (or anything else for that matter)

Here is my log: http://pastebin.com/vHyrpmrW

I am really at loss here. No indication, WHY it actually fails.
Could you try to access your PMS from a browser and post the XML source?
This address seems to fail: http://192.168.1.51:32400/library/sections/1/all

Hi @baa - thanks for your response

I went to the URI that you posted and I got the attached ‘pink’ message

As for getting the XML source - I am running Chrome on OSX - and I cannot find anywhere I can get that? I can “get” the HTML or the .js source. I can see errors on the Chrome console (see the other attached file)

Does that help? Any other ways I can get this to you (i tried to install XML extensions - without any luck, to get this to you)?

Cheers, Ben

-> https://support.google.com/adsense/answer/181951?hl=en
Or just use “curl address > source.xml” in a terminal.

Try download PMS with a browser that is not Chrome, and is not Safari. Then reinstall PMS. Both Chrome and Safari are known to download (sometimes) incomplete PMS install files.

???
Really?

It happens to PMS users in Synology, nobody knows why, but when Safari / Chrome are used to download the PMS installer for Synology, many users report problems during installation. When the process is repeated with Firefox it works.

One example here.

I never had an issue on OS X downloading PMS via safari or chrome personally.

I have PMS installed in an ODROID (ARMv7), and I have the same issue.