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

Crash during sync : Read timed out. (read timeout=30) #956

Closed
radxrico opened this issue Jun 28, 2022 · 23 comments
Closed

Crash during sync : Read timed out. (read timeout=30) #956

radxrico opened this issue Jun 28, 2022 · 23 comments
Labels
duplicate This issue or pull request already exists

Comments

@radxrico
Copy link

radxrico commented Jun 28, 2022

correction below, hopefully

@glensc
Copy link
Collaborator

glensc commented Jun 29, 2022

Unclear what is the first trace from, seems you have truncated beginning of the output to see what it's from

But the second error is definitely because you have typed literal ID to the inspect command, you need to replace ID with the problematic id of the media, which may be the one seen in the sync script trace.

@glensc
Copy link
Collaborator

glensc commented Jun 29, 2022

You need to provide the output of the command run:

It gets to 95% done then it crashes

attach as .txt file if it's too long

@radxrico
Copy link
Author

radxrico commented Jun 29, 2022

Is this correct?

`C:\Users\admin\Downloads\PlexTraktSync-0.20.1\PlexTraktSync-0.20.1>python -m plextraktsync inspect PlexLibrarySection:movie:Movies (Documentary)
PlexTraktSync [0.20.x]

Traceback (most recent call last):
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\models.py", line 434, in prepare_url
    scheme, auth, host, port, path, query, fragment = parse_url(url)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\util\url.py", line 394, in parse_url
    return six.raise_from(LocationParseError(source_url), None)
  File "<string>", line 3, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: https://plex.pardesi.club:443PlexLibrarySection:movie:Movies

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\admin\Downloads\PlexTraktSync-0.20.1\PlexTraktSync-0.20.1\plextraktsync\__main__.py", line 18, in <module>
    cli()
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\admin\Downloads\PlexTraktSync-0.20.1\PlexTraktSync-0.20.1\plextraktsync\cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "C:\Users\admin\Downloads\PlexTraktSync-0.20.1\PlexTraktSync-0.20.1\plextraktsync\commands\inspect.py", line 101, in inspect
    inspect_media(id)
  File "C:\Users\admin\Downloads\PlexTraktSync-0.20.1\PlexTraktSync-0.20.1\plextraktsync\commands\inspect.py", line 32, in inspect_media
    pm = plex.fetch_item(id)
  File "C:\Users\admin\Downloads\PlexTraktSync-0.20.1\PlexTraktSync-0.20.1\plextraktsync\decorators\nocache.py", line 12, in inner
    return method(*args, **kwargs)
  File "C:\Users\admin\Downloads\PlexTraktSync-0.20.1\PlexTraktSync-0.20.1\plextraktsync\plex_api.py", line 506, in fetch_item
    media = self.plex.library.fetchItem(key)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\plexapi\base.py", line 174, in fetchItem
    data = self._server.query(ekey)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\plexapi\server.py", line 696, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests_cache\session.py", line 115, in request
    return super().request(method, url, headers=headers, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 573, in request
    prep = self.prepare_request(req)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 484, in prepare_request
    p.prepare(
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\models.py", line 368, in prepare
    self.prepare_url(url, params)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\models.py", line 436, in prepare_url
    raise InvalidURL(*e.args)
requests.exceptions.InvalidURL: Failed to parse: https://plex.pardesi.club:443PlexLibrarySection:movie:Movies

C:\Users\admin\Downloads\PlexTraktSync-0.20.1\PlexTraktSync-0.20.1>`

@glensc
Copy link
Collaborator

glensc commented Jun 30, 2022

as you can see, an error, so no. movie id is a number, you must supply a number, i.e value of the key=/library/metadata/17473 URL parameter, in this case 17473

also, edit your post and put text output to the markdown code block.

and, I asked full reproducer of the problem, not a repeat inspect command.

@radxrico
Copy link
Author

Sorry glen I tried to edit and didn't see text output markdown code black. I saw 'code is that what you meant?

When I did the `C:\Users\admin\Downloads\PTS\PTS>python -m plextraktsync inspect 17473
PlexTraktSync [0.20.x]

Inspecting 17473: Not found`

that's the error I got. Once again I'm extremely new to this, so if you have an exact code/command I can do that. Normally I just run the shortcut , I found out how to do the python -m by googling to get a result where it doesn't crash so I could see the error you see above.

Additonally I don't see any numbers when I start, it just looks like this.

INFO PlexTraktSync [0.20.x] Sync Movie sections: [<PlexLibrarySection:movie:Movies>, <PlexLibrarySection:movie:Movies (4K)>, <PlexLibrarySection:movie:Movies (Anime)>, <PlexLibrarySection:movie:Movies (Christmas)>, <PlexLibrarySection:movie:Movies (Documentary)>, <PlexLibrarySection:movie:Movies (Dolby Vision)>, <PlexLibrarySection:movie:Movies (Fitness)>, <PlexLibrarySection:movie:Movies (Foreign)>, <PlexLibrarySection:movie:Movies (Hindi Dubbed)>, <PlexLibrarySection:movie:Movies (IMAX)>, <PlexLibrarySection:movie:Movies (IMAX) (4K)>, <PlexLibrarySection:movie:Movies (India)>, <PlexLibrarySection:movie:Movies (Kids)>, <PlexLibrarySection:movie:Movies (Remux)>, <PlexLibrarySection:movie:Movies (Remux) (4K)>, <PlexLibrarySection:movie:Music (Concerts)>, <PlexLibrarySection:movie:Stand Up Comedy>] Sync Show sections: [<PlexLibrarySection:show:TV>, <PlexLibrarySection:show:TV (4K)>, <PlexLibrarySection:show:TV (Anime)>, <PlexLibrarySection:show:TV (Documentary)>, <PlexLibrarySection:show:TV (Fitness)>, <PlexLibrarySection:show:TV (Hindi Dubbed)>, <PlexLibrarySection:show:TV (India)>, <PlexLibrarySection:show:TV (Kids)>, <PlexLibrarySection:show:TV (MasterClass)>, <PlexLibrarySection:show:TV (Remux)>, <PlexLibrarySection:show:TV (Remux) (4K)>, <PlexLibrarySection:show:TV (Sports)>]

@simonc56
Copy link
Collaborator

simonc56 commented Jul 2, 2022

@radxrico you've been asked 3 times to provide full output of your sync crash. Please do it if you want some help.

@radxrico
Copy link
Author

radxrico commented Jul 5, 2022

@twolaw can you provide me with exact instructions? I've never messed with python and have a windows zip installation. I want to provide everything I can to get the matter resolved for myself and future people, so if you guys can just explain exactly what commands/how to do it I can provide such.

@glensc
Copy link
Collaborator

glensc commented Jul 5, 2022

You need to provide the full text output of the command that crashes. currently, you have deleted your output, only left traces are from inspect command, and that is not the crash the bugreport was about. you should restore original bug report as well.

@radxrico
Copy link
Author

radxrico commented Jul 5, 2022

@glensc

Ok, I am opening the .bat in command now so it doesn't close the window like it does when I just use the shortcut. I will copy everything it says.

Is there any other information you can give me to give you what you need? Exact commands on how to see what you need?

EDIT: After running the bat in CMD instead of the shortcut I'm able to see the error messages when it fails which is this (the normal shortcut just closes /crashes when it hits this point'

`WARNING  <Movie:576505:Searching-for-Sheela>: Skipping guid <PlexGuid:tvdb://158086> not found on Trakt
INFO     Adding to collection: <tmdb:957258:Movie:1184132:What-Is-a-Woman?>
Processing Movies (Documentary)  96% ------------------------------------ - 1,109/1,155  [ 0:04:00 < 0:00:12 , 4 it/s ]
Traceback (most recent call last):
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 1374, in getresponse
    response.begin()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1274, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1130, in read
    return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\adapters.py", line 489, in send
    resp = conn.urlopen(
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\util\retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\packages\six.py", line 770, in reraise
    raise value
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py", line 451, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\urllib3\connectionpool.py", line 340, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='plex.pardesi.club', port=443): Read timed out. (read timeout=30)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\__main__.py", line 18, in <module>
    cli()
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\cli.py", line 46, in cli
    sync()
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\commands\sync.py", line 60, in sync
    runner.sync(walker=w, dry_run=config.dry_run)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\sync.py", line 67, in sync
    self.sync_collection(movie, dry_run=dry_run)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\sync.py", line 103, in sync_collection
    m.add_to_collection(batch=True)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\media.py", line 89, in add_to_collection
    self.trakt_api.add_to_collection(self.trakt, self.plex, batch=batch)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\trakt_api.py", line 208, in add_to_collection
    **pm.to_json(),
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\plex_api.py", line 392, in to_json
    "resolution": self.resolution,
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\plex_api.py", line 289, in resolution
    stream = self.video_streams[0]
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\plex_api.py", line 248, in video_streams
    return self.streams(VideoStream)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\decorators\flatten.py", line 7, in inner
    return list(method(*args, **kwargs))
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\plex_api.py", line 237, in streams
    for part in self.parts:
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\plex_api.py", line 231, in parts
    item = self.plex.fetch_item(self.item.ratingKey)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\decorators\nocache.py", line 12, in inner
    return method(*args, **kwargs)
  File "C:\Users\admin\Downloads\PTS\PTS\plextraktsync\plex_api.py", line 506, in fetch_item
    media = self.plex.library.fetchItem(key)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\plexapi\base.py", line 174, in fetchItem
    data = self._server.query(ekey)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\plexapi\server.py", line 696, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests_cache\session.py", line 115, in request
    return super().request(method, url, headers=headers, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests_cache\session.py", line 147, in send
    response = self._send_and_cache(request, actions, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests_cache\session.py", line 189, in _send_and_cache
    response = super().send(request, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\adapters.py", line 578, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='plex.pardesi.club', port=443): Read timed out. (read timeout=30)

C:\Users\admin\Downloads\PTS\PTS>`

Since I am unsure beyond this what to provide I'll need exact commands to do please.
plextraktsync.log

@radxrico
Copy link
Author

radxrico commented Jul 6, 2022

Just out of curiosity i did a re-install using pipx since that was the recommended and I ran into the e same error. On that one I was able to at least use the command and just try syncing tv shows to bypass where it keeps getting stuck and ran into the following:

Processing TV   5% ---- ------------------------------------------------------------------------------ 336/6,180  [ 11:57:05 < -:--:-- , ? it/s ]
Traceback (most recent call last):
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 1374, in getresponse
    response.begin()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1274, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1130, in read
    return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\requests\adapters.py", line 489, in send
    resp = conn.urlopen(
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\urllib3\util\retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\urllib3\packages\six.py", line 770, in reraise
    raise value
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\urllib3\connectionpool.py", line 451, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\urllib3\connectionpool.py", line 340, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='plex.pardesi.club', port=443): Read timed out. (read timeout=30)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\users\admin\.local\bin\plextraktsync.exe\__main__.py", line 7, in <module>
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\commands\sync.py", line 60, in sync
    runner.sync(walker=w, dry_run=config.dry_run)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\sync.py", line 75, in sync
    self.sync_collection(episode, dry_run=dry_run)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\sync.py", line 103, in sync_collection
    m.add_to_collection(batch=True)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\media.py", line 90, in add_to_collection
    self.trakt_api.add_to_collection(self.trakt, self.plex, batch=batch)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\trakt_api.py", line 217, in add_to_collection
    item = dict(**m.ids, **pm.to_json())
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\plex_api.py", line 392, in to_json
    "resolution": self.resolution,
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\plex_api.py", line 289, in resolution
    stream = self.video_streams[0]
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\plex_api.py", line 248, in video_streams
    return self.streams(VideoStream)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\decorators\flatten.py", line 7, in inner
    return list(method(*args, **kwargs))
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\plex_api.py", line 237, in streams
    for part in self.parts:
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\plex_api.py", line 231, in parts
    item = self.plex.fetch_item(self.item.ratingKey)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\decorators\nocache.py", line 12, in inner
    return method(*args, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\plex_api.py", line 506, in fetch_item
    media = self.plex.library.fetchItem(key)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plexapi\base.py", line 174, in fetchItem
    data = self._server.query(ekey)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\plexapi\server.py", line 696, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\requests\sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\requests_cache\session.py", line 115, in request
    return super().request(method, url, headers=headers, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\requests_cache\session.py", line 147, in send
    response = self._send_and_cache(request, actions, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\requests_cache\session.py", line 189, in _send_and_cache
    response = super().send(request, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\admin\.local\pipx\venvs\plextraktsync\lib\site-packages\requests\adapters.py", line 578, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='plex.pardesi.club', port=443): Read timed out. (read timeout=30)

@glensc
Copy link
Collaborator

glensc commented Jul 6, 2022

Duplicate, Plex timeout PlexTraktSync can not handle. See your plex server logs.

You may have luck increasing plex timeout:

@glensc glensc closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2022
@glensc glensc added the duplicate This issue or pull request already exists label Jul 6, 2022
glensc added a commit to glensc/PlexTraktSync that referenced this issue Jul 6, 2022
Small mitigation for:
- Taxel#956
glensc added a commit to glensc/PlexTraktSync that referenced this issue Jul 6, 2022
Small mitigation for:
- Taxel#956
@radxrico
Copy link
Author

radxrico commented Jul 6, 2022

Hello @glensc , I checked the Timout link that you suggested, but the filenames in there may have changed for me to look into that option. Looks like that was from 2019 and I don't have a main.py that I can see in the files.

Can you offer any assistance so I can give it a shot to change the timeout like you said?

@simonc56
Copy link
Collaborator

simonc56 commented Jul 6, 2022

Do you use a reverse-proxy or anything similar ?

@glensc
Copy link
Collaborator

glensc commented Jul 7, 2022

@radxrico what main.py? I linked to particular comment:

Copying content for reference:

Owner
Taxel on 25 Nov 2019
My means of fixing this are very limited. Might it be helpful to you if you could edit the PlexAPI configuration file ( on 25 Nov 2019) directly? With this, you could try to increase the timeout from 30 seconds (which already seems high) to 60 or 120 seconds. It is, of course, possible for me to change the script so instead of stopping it just skips the library item where this occurs, but to me that does not make a lot of sense: When the connection to the Plex server does not work, the program should terminate instead of trying all the other library items and hoping that the Plex server answers some of them.

and the link still points to proper documentation:

@glensc glensc reopened this Jul 7, 2022
@glensc
Copy link
Collaborator

glensc commented Jul 7, 2022

@radxrico also, did you check plex server logs as asked?

@radxrico
Copy link
Author

radxrico commented Jul 7, 2022

@twolaw - I do have a VPN, but I also tried disabling that to run plextraktsync , showing no difference.

@glensc I was referring to the main.py from the user who posted this in the Timeout link

So I tried with ./plex_trakt_sync.sh but had another issue as per below:

root@NasFamille:/volume1/docker/Python - PlexTraktSync# ./plex_trakt_sync.sh
./plex_trakt_sync.sh: line 3: python3: command not found
Finally, looking at the file plex_trakt_sync.sh, I copied the 3rd line python3 ./main.py and everything worked!

root@NasFamille:/volume1/docker/Python - PlexTraktSync# python3 ./main.py
Processing section Cartoons
Processing section Movies
Processing section Movies for kids
Processing section TV Shows
Completed full sync in 895.47135329246521 seconds
I'm not to sure what was wrong but thank you for the development of this script!!!

In regards to the python-plexapi. I just tried installing that with pip and it seemed to install, but I cant find the config.ini it says to change anything with the timeout. Can you offer any assistance with that if you think that will fix the error?

In regards to the plex server logs, I only use the player, not really the server, but I did a search to fin dout where they would be and no logs were changed since 4/24/2019. Probably when I installed there server instead of the player by accident. see attached file. Unless you have alternate locations or meanings I can search for more if you just tell me where it would be.
serverlogsplex

(EDIT: PS - Sorry for posting in the other thread about your Feature: Add Plex Timeout Config. I was just trying to see if that fixed the problem and wanted to help out to troubleshoot what you did. I copied the file changes you did to see if it would work. Just trying to help troubleshoot so this can work for me and if others are experiencing the same.

@glensc
Copy link
Collaborator

glensc commented Jul 11, 2022

@radxrico come on. i copied exact text you needed to read:

Might it be helpful to you if you could edit the PlexAPI configuration file ( 4 days ago) ( on 25 Nov 2019) directly?

from that link you can read out the config file is to be created at:

~/.config/plexapi/config.ini

I don't know what is equivalent of ~/.config/plexapi for windows, you need to ask their issues/discussion. not here.

however, if you read the link, you can read out that you can set the config values with environment variables as well.

and also, with 0.20.4 you can use just plextraktsync config:

and also, you have deleted your issue body, you should restore it as already asked.

@radxrico
Copy link
Author

radxrico commented Jul 18, 2022

I apologize @glensc , I've been unable to get you the information you need to help me. So I'm just going to see if someone else has the same issues and keep an eye on a solution or an update maybe that may magically fix it?

Perhaps you can answer a couple of questions

  1. My question is: Can I skip libraries to start my search?

Example, for the Movies it crashes at (Documentary), is there a way I can omit certain libraries from Movies to not sync, so just Skip that Documentaries library in Movies and go forward?

  1. Can I start a scan from a letter instead of from the beginning? I've been using python3 plextraktsync sync --synch=shows from the pipx version (gave up on the windows one since it kept crashing), and it has to go through the entire beginning scan. I have had success in the past 5-6 days, but it will eventually crash. I would like to just pick up where it crashed last. Example, if it crashes on the letter M, can I do a certain command to start there instead of waiting 4-8hours for it to just get back to that point where it stopped?

If so that would be helpful. One could just skip the letter to maybe proceed/get past whatever is making it break.
python3 plextraktsync sync --synch=shows M then it would start synching tv shows beginning with M or python3 plextraktsync sync --synch=shows Me it would start with tv shows starting with Me

@simonc56 simonc56 changed the title Crash during sync Crash during sync : Read timed out. (read timeout=30) Aug 2, 2022
@simonc56
Copy link
Collaborator

simonc56 commented Aug 2, 2022

Fixed by #965 : @radxrico a feedback would be appreciated before we close this issue.

@radxrico
Copy link
Author

radxrico commented Aug 2, 2022

hello @twolaw I still havent been able to get past the one point with the crash.
I've been trying for about 3 weeks almost with syncing tv shows and bypassing the movies. It will go so far, then crash and ill restart it. I'm up to the T's so it's at least progressing with the TV shows, unlike the movies/documentary where it keeps getting to the exact same point and crashing. I'm not sure what to do there.

If you can provide step by step instructions on the timeouts I can attempt that and report back!

@simonc56
Copy link
Collaborator

simonc56 commented Aug 3, 2022

HTTPSConnectionPool(host='plex.pardesi.club', port=443)

I think your plextraktsync script and your Plex server are not on the same local network. That's the problem for a first sync of a huge library.
Where is plex.pardesi.club server ? Is it a shared library ?

Can you login to plex again with this command :
plextraktsync plex-login
and show the Server connections of your server.

Usually the plex server is found at a plex.direct address and on port 32400.
As an example, my Plex server returns :

Login to MyPlex was successful!
Attempting to connect to MultimediaServer. This may take time and print some errors.
Server connections:
    https://192-168-1-31.b35c71e5e99c40bd94712647d30922xx.plex.direct:32400
    https://176-160-XXX-XXX.b35c71e5e99c40bd94712647d30922xx.plex.direct:16422
    https://139-162-XXX-XXX.b35c71e5e99c40bd94712647d30922xx.plex.direct:8443
Connection to MultimediaServer established successfully!

@radxrico
Copy link
Author

radxrico commented Aug 3, 2022

Thank you for the response twolaw, it is a shared library.

I'm unfortunately away from my system for a few days to check this, but i will and give you the information! Thank you

@simonc56 simonc56 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2022
@cenunix
Copy link

cenunix commented Aug 29, 2023

@twolaw i use direct connect and and still get timeout errors, both my plex-trakt-sync and plex server are on the same docker network. I have a reverse proxy setup, but of these containers are running on the same machine and i have seen in the ReadTimeout error that trakt-sync is indeed using the direct connection url options or referencing the static docker container ip that I configured manually in servers.yml. I repeatedly get timeout errors on one item, then usually easily add 3-4 items to collection, then stuck again on one item (repeatedly failing until i get lucky?). I'm not sure how to change the timeout, see my comment in issue #1455. thanks for the help, i thought i would add some more context of my situation here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants