Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Connect? #11

Open
paterson37 opened this issue Feb 11, 2024 · 1 comment
Open

Can't Connect? #11

paterson37 opened this issue Feb 11, 2024 · 1 comment

Comments

@paterson37
Copy link

Hi,

Just wondering if you know what I've done wrong here?

`C:\Users\Craig\plex2letterboxd>python -m plex2letterboxd
Traceback (most recent call last):
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connection.py", line 198, in _new_conn
sock = connection.create_connection(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
raise err
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connectionpool.py", line 793, in urlopen
response = self._make_request(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connectionpool.py", line 496, in _make_request
conn.request(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connection.py", line 400, in request
self.endheaders()
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\http\client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\http\client.py", line 1010, in _send_output
self.send(msg)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\http\client.py", line 950, in send
self.connect()
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connection.py", line 238, in connect
self.sock = self._new_conn()
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connection.py", line 213, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x03ED2A18>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connectionpool.py", line 847, in urlopen
retries = retries.increment(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='172.18.0.7', port=32400): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x03ED2A18>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Craig\plex2letterboxd\plex2letterboxd_main
.py", line 4, in
plex2letterboxd.main()
File "C:\Users\Craig\plex2letterboxd\plex2letterboxd\plex2letterboxd.py", line 67, in main
plex = PlexServer(auth['baseurl'], auth['token'])
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\plexapi\server.py", line 116, in init
data = self.query(self.key, timeout=self._timeout)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\plexapi\server.py", line 759, in query
response = method(url, headers=headers, timeout=timeout, **kwargs)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='172.18.0.7', port=32400): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x03ED2A18>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

C:\Users\Craig\plex2letterboxd>python -m plex2letterboxd
Traceback (most recent call last):
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connection.py", line 198, in _new_conn
sock = connection.create_connection(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
raise err
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connectionpool.py", line 793, in urlopen
response = self._make_request(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connectionpool.py", line 496, in _make_request
conn.request(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connection.py", line 400, in request
self.endheaders()
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\http\client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\http\client.py", line 1010, in _send_output
self.send(msg)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\http\client.py", line 950, in send
self.connect()
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connection.py", line 238, in connect
self.sock = self._new_conn()
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connection.py", line 213, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x04192A18>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\connectionpool.py", line 847, in urlopen
retries = retries.increment(
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='172.18.0.7', port=32400): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x04192A18>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Craig\plex2letterboxd\plex2letterboxd_main
.py", line 4, in
plex2letterboxd.main()
File "C:\Users\Craig\plex2letterboxd\plex2letterboxd\plex2letterboxd.py", line 67, in main
plex = PlexServer(auth['baseurl'], auth['token'])
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\plexapi\server.py", line 116, in init
data = self.query(self.key, timeout=self._timeout)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\plexapi\server.py", line 759, in query
response = method(url, headers=headers, timeout=timeout, **kwargs)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Craig\AppData\Local\Programs\Python\Python39-32\lib\site-packages\requests\adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='172.18.0.7', port=32400): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x04192A18>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))`

@mtimkovich
Copy link
Owner

I'm not sure... I'll need some more information.

  • Are you able to ping the host?
  • What OS is running the plex server and is it a different machine than the one you're running the script on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants