Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Download fails 'object has no attribute 'id'' #8

Closed
piratsch opened this issue Jun 1, 2022 · 2 comments
Closed

Download fails 'object has no attribute 'id'' #8

piratsch opened this issue Jun 1, 2022 · 2 comments

Comments

@piratsch
Copy link
Contributor

piratsch commented Jun 1, 2022

Hi!

I often get the following error when the script tries to download tv series:

Exception in thread Thread-127:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/script/plex_rd.py", line 1313, in download
    result[index] = cls.download(library=library,parentReleases=parentReleases)
  File "/script/plex_rd.py", line 347, in download
    if not self.debrid_download():
  File "/script/plex_rd.py", line 381, in debrid_download
    if not debrid.download(self,stream=False):
  File "/script/plex_rd.py", line 714, in download
    if service.download(element,stream=stream,query=query,force=force):
  File "/script/plex_rd.py", line 868, in download
    debrid.realdebrid.post('https://api.real-debrid.com/rest/1.0/torrents/selectFiles/' + str(response.id), {'files':'all'})
AttributeError: 'types.SimpleNamespace' object has no attribute 'id'
@itsToggle
Copy link
Owner

Oh, I should have cought that exception. The error gets triggered because the uncached torrent that was added is still in the "Magnet conversion" Phase, which usually means its broken. The script tries to select the files for the torrent, but the torrent isnt ready yet. Ive added a bit of a delay and added a catch for the exception. Can you try it again with the latest version?

@piratsch
Copy link
Contributor Author

piratsch commented Jun 1, 2022

Seems to be fixed now, thanks a lot!

@piratsch piratsch closed this as completed Jun 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants