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

Error getting external key tvdb, error: ForbiddenException(<Response [403]>) #11859

Open
dirkronsmans opened this issue Oct 16, 2024 · 0 comments

Comments

@dirkronsmans
Copy link

Describe the bug
Warning in the logs regarding tvdb

Medusa (please complete the following information):

  • Branch: master
  • Commit: 34a67cf
  • Version: 1.0.21
  • Database: 44.19
  • Python Version: 3.8.12 (default, Nov 15 2021, 06:04:41) [GCC 8.5.0]

Debug logs (at least 50 lines):
General > Advanced Settings > Enable debug

2024-10-15 04:42:09 WARNING  SHOWQUEUE-UPDATE :: [34a67cf] Error getting external key tvdb, error: ForbiddenException(<Response [403]>)
Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/medusa/helpers/externals.py", line 48, in get_trakt_externals
    result = sync.search_by_id(externals[external_key], id_type=trakt_mapping[external_key], media_type='show')
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 578, in inner
    json_data = self._handle_request('get', url)
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 550, in _handle_request
    raise self.error_map[response.status_code](response)
trakt.errors.ForbiddenException: Forbidden - invalid API key or unapproved app
2024-10-15 04:17:16 WARNING  POSTPROCESSOR :: [34a67cf] Unhashable type encountered. Please report this warning to the developers.
TypeError('Object of type Episode is not JSON serializable')
Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/medusa/ws/__init__.py", line 41, in json
    return json.dumps(self.content)
  File "/usr/lib/python3.8/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Episode is not JSON serializable
2024-10-15 04:17:14 WARNING  POSTPROCESSOR :: [34a67cf] Show id not found: no suggestion
2024-10-13 14:52:21 WARNING  SHOWQUEUE-ADD :: [34a67cf] Error getting external key tvdb, error: ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')))
Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/ext/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
  File "/volume1/@appstore/medusa/src/ext/urllib3/connectionpool.py", line 467, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/volume1/@appstore/medusa/src/ext/urllib3/connectionpool.py", line 462, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1387, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 321, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 282, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/ext/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/volume1/@appstore/medusa/src/ext/urllib3/connectionpool.py", line 799, in urlopen
    retries = retries.increment(
  File "/volume1/@appstore/medusa/src/ext/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/volume1/@appstore/medusa/src/ext/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/volume1/@appstore/medusa/src/ext/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
  File "/volume1/@appstore/medusa/src/ext/urllib3/connectionpool.py", line 467, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/volume1/@appstore/medusa/src/ext/urllib3/connectionpool.py", line 462, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1387, in getresponse
    response.begin()
  File "/usr/lib/python3.8/http/client.py", line 321, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 282, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/medusa/helpers/externals.py", line 48, in get_trakt_externals
    result = sync.search_by_id(externals[external_key], id_type=trakt_mapping[external_key], media_type='show')
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 578, in inner
    json_data = self._handle_request('get', url)
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 543, in _handle_request
    response = session.request(method, url, headers=HEADERS,
  File "/volume1/@appstore/medusa/src/ext/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/volume1/@appstore/medusa/src/ext/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/volume1/@appstore/medusa/src/ext/requests/adapters.py", line 501, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2024-10-11 15:56:04 WARNING  Thread_0 :: [34a67cf] Unable to get trakt user, error: Forbidden - invalid API key or unapproved app
Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/medusa/helpers/trakt.py", line 23, in get_trakt_user
    user = users.get_user_settings()
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 578, in inner
    json_data = self._handle_request('get', url)
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 550, in _handle_request
    raise self.error_map[response.status_code](response)
trakt.errors.ForbiddenException: Forbidden - invalid API key or unapproved app
2024-10-11 15:56:04 WARNING  Thread_0 :: [34a67cf] Unable to test TRAKT: ForbiddenException(<Response [403]>)
Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/medusa/notifiers/trakt.py", line 159, in test_notify
    trakt_user = get_trakt_user()
  File "/volume1/@appstore/medusa/src/medusa/helpers/trakt.py", line 23, in get_trakt_user
    user = users.get_user_settings()
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 578, in inner
    json_data = self._handle_request('get', url)
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 550, in _handle_request
    raise self.error_map[response.status_code](response)
trakt.errors.ForbiddenException: Forbidden - invalid API key or unapproved app
2024-10-11 15:55:56 WARNING  APIv2-Thread_1 :: [34a67cf] Could not get the `removed from medusa` list
Traceback (most recent call last):
  File "/volume1/@appstore/medusa/src/medusa/server/api/v2/recommended.py", line 48, in get
    data['removedFromMedusa'] = TraktPopular().get_removed_from_medusa()
  File "/volume1/@appstore/medusa/src/medusa/show/recommendations/trakt.py", line 128, in get_removed_from_medusa
    library_shows = sync.get_watched('shows', extended='noseasons') + sync.get_collection('shows', extended='full')
  File "/volume1/@appstore/medusa/src/ext/wrapt/wrappers.py", line 578, in __call__
    return self._self_wrapper(self.__wrapped__, self._self_instance,
  File "/volume1/@appstore/medusa/src/ext/deprecated/classic.py", line 186, in wrapper_function
    return wrapped_(*args_, **kwargs_)
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 578, in inner
    json_data = self._handle_request('get', url)
  File "/volume1/@appstore/medusa/src/ext/trakt/core.py", line 550, in _handle_request
    raise self.error_map[response.status_code](response)
trakt.errors.ForbiddenException: Forbidden - invalid API key or unapproved app
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

1 participant