Error when opening PlexConnect

hey guys, a little help here would highly appreciated.

every time i try to open PlexConnect using terminal i get this error

Ioanniss-iMac:~ JackMac$ sudo /Applications/PlexConnect-new-movie-sections/PlexConnect.py
Traceback (most recent call last):
  File "/Applications/PlexConnect-new-movie-sections/PlexConnect.py", line 15, in 
    import PlexGDM
  File "/Applications/PlexConnect-new-movie-sections/PlexGDM.py", line 14, in 
    import Settings
  File "/Applications/PlexConnect-new-movie-sections/Settings.py", line 20
SyntaxError: Non-ASCII character '\xe2' in file /Applications/PlexConnect-new-movie-sections/Settings.py on line 20, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Does anyone know what do i have to do?

Can you check what is on line 20 in that Settings.py file?

A solution, as suggested by the article from the link given in the error message, would be to open that Settings.py file and put this on the first line of the file:

# -*- coding: utf-8 -*-

cant understand whats wrong with it, in every tutorial i read/watch its the same

thats the setting.py file, after i added your suggestion, but nothing changed

# -*- coding: utf-8 -*-
#!/usr/bin/python
 
"""
Global Settings...
"""
 
#
# Plex Media Server
def getPlexGDM():
    return True  # True: use PlexGDM (GoodDayMate) to auto discover PMS
 
def getIP_PMS():  # default IP, if GDM fails... todo: do we need this fall back?
    return '192.168.178.2'
def getPort_PMS():
    return 32400
 
#
# DNS/WebServer
def getIP_DNSmaster():  # Router, ISP's DNS, ...
    return ‘192.168.1.1’  # google public DNS
 
def getHostToIntercept():
    return 'trailers.apple.com'
 
 
after i added the first line and tried again, i get a message...
 

Ioanniss-iMac:~ JackMac$ sudo /Applications/PlexConnect-new-movie-sections/PlexConnect.py 

Traceback (most recent call last):

  File "/Applications/PlexConnect-new-movie-sections/PlexConnect.py", line 15, in

    import PlexGDM

  File "/Applications/PlexConnect-new-movie-sections/PlexGDM.py", line 14, in

    import Settings

  File "/Applications/PlexConnect-new-movie-sections/Settings.py", line 21

    return ‘192.168.1.1’  # google public DNS

           ^

SyntaxError: invalid syntax

a - where did you get that copy of PlexConnect from?

b - what did you edit in settings.cfg?

a - i downloaded the ZIP file from there  https://github.com/iBaa/PlexConnect

b - i edited this part 

# DNS/WebServer
def getIP_DNSmaster():  # Router, ISP's DNS, ...
    return ‘192.168.1.1’  # google public DNS
 
i changed the original 8.8.8.8 with 192.168.1.1
as mentioned on the tutorial i found in www.youtube.com/watch?v=puAAgQTlnBI  (3:50)

Change

return ‘192.168.1.1’

to

return '192.168.1.1'

to fix the encoding/syntax issue (notice the difference in apostrophes).

Thanks sander1, that was the problem , i finally managed to run PlexConnect

But now i get a message "Trailers is Unavailable. Try again later

Last login: Tue Feb 11 19:46:34 on console

Ioanniss-iMac:~ JackMac$ sudo /Applications/PlexConnect-new-movie-sections/PlexConnect.py 

Password:

PlexConnect : ***

PlexConnect : PlexConnect

PlexConnect : Press ENTER to shut down.

PlexConnect : ***

PlexConnect : IP_self: 192.168.1.3

PlexGDM : ***

PlexGDM : looking up Plex Media Server

PlexGDM : ***

PlexGDM : servers discovered: 1

DNSServer : ***

DNSServer : Starting up.

DNSServer : intercept trailers.apple.com: 192.168.1.3

DNSServer : forward other to higher level DNS: 192.168.1.1

DNSServer : ***

WebServer : ***

WebServer : WebServer: Serving HTTP on 0.0.0.0 port 80.

WebServer : ***

DNSServer : DNS request received!

DNSServer : Source: ('192.168.1.2', 49435)

DNSServer : Domain: trailers.apple.com

DNSServer : ***intercept request

DNSServer : -> DNS response: 192.168.1.3

 

- Plex Media Server is up and running

- copied treilers.pem to PlexConnect/assets/certificate folder

- manually changed the DNS of ATV to the exact one my iMac has ( 192.168.1.3 )

 

Any ideas what the problem might be?

a - i downloaded the ZIP file from there  https://github.com/iBaa/PlexConnect

b - i edited this part 

# DNS/WebServer
def getIP_DNSmaster():  # Router, ISP's DNS, ...
    return ‘192.168.1.1’  # google public DNS
 
i changed the original 8.8.8.8 with 192.168.1.1
as mentioned on the tutorial i found in www.youtube.com/watch?v=puAAgQTlnBI  (3:50)
  • Settings.py - Basic settings collection. Creates Settings.cfg at first run - which may be modified externally.
  • Settings.py - Basic settings collection. Creates Settings.cfg at first run - which may be modified externally.

There is no settings.cfg file, cant see any file of that type

there is only a ATVSettings.cfg file , dont know if you mean that one

You should NOT modify settings.py, throw the folder away and start again. Settings.cfg is created at first clean shutdown (CTR+c). Read the sticky for the official guides and troubleshooting, any other guides are possibly wrong and not supported.

Ok, so i'll delete everything and start over.

following these guides 

- downloading .zip file

- following these guides https://langui.sh/2013/08/27/appletv-ssl-plexconnect/   (....how do i " add two new lines to configuration" in the last step?)

setting AppleTV's DNS address to the computer running PlexConnect

- and launch 'Trailers"

am i missing something?? 

The source files you downloaded in the first place were OLD. Really old. You must have gotten them somewhere out of the github archive, but it for sure was no recent version.

Follow the "official" WIKI, link in the signature. That should work (and be current) for the most part.

Finally worked, I started the whole procedure from the beginning downloading the most recent files and it finally worked.

Many thanks guys, highly appreciated the quick responses

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