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

urllib3.exceptions.LocationParseError #17

Open
samishal1998 opened this issue Feb 23, 2021 · 0 comments
Open

urllib3.exceptions.LocationParseError #17

samishal1998 opened this issue Feb 23, 2021 · 0 comments

Comments

@samishal1998
Copy link

Python 3.8.5
plex Version 4.51.1

myplex

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/models.py", line 379, in prepare_url
    scheme, auth, host, port, path, query, fragment = parse_url(url)
  File "/usr/lib/python3/dist-packages/urllib3/util/url.py", line 392, 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://my.plexapp.com/users/sign_in.xml

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "PlexMALSync.py", line 71, in <module>
    plex = plex_authenticate()
  File "PlexMALSync.py", line 43, in plex_authenticate
    account = MyPlexAccount(plex_user, plex_password)
  File "/home/cod/.local/lib/python3.8/site-packages/plexapi/myplex.py", line 79, in __init__
    data, initpath = self._signin(username, password, timeout)
  File "/home/cod/.local/lib/python3.8/site-packages/plexapi/myplex.py", line 87, in _signin
    data = self.query(self.SIGNIN, method=self._session.post, auth=(username, password), timeout=timeout)
  File "/home/cod/.local/lib/python3.8/site-packages/plexapi/myplex.py", line 152, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 519, in request
    prep = self.prepare_request(req)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 452, in prepare_request
    p.prepare(
  File "/usr/lib/python3/dist-packages/requests/models.py", line 313, in prepare
    self.prepare_url(url, params)
  File "/usr/lib/python3/dist-packages/requests/models.py", line 381, in prepare_url
    raise InvalidURL(*e.args)
requests.exceptions.InvalidURL: Failed to parse: https://my.plexapp.com/users/sign_in.xml

direct

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/models.py", line 379, in prepare_url
    scheme, auth, host, port, path, query, fragment = parse_url(url)
  File "/usr/lib/python3/dist-packages/urllib3/util/url.py", line 392, in parse_url
    return six.raise_from(LocationParseError(source_url), None)
  File "<string>", line 3, in raise_from
urllib3.exceptions.LocationParseError: Failed to parse: http://127.0.0.1:32400/?X-Plex-Token=<hidden>
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "PlexMALSync.py", line 71, in <module>
    plex = plex_authenticate()
  File "PlexMALSync.py", line 37, in plex_authenticate
    plex = PlexServer(base_url, token)
  File "/home/cod/.local/lib/python3.8/site-packages/plexapi/server.py", line 101, in __init__
    data = self.query(self.key, timeout=timeout)
  File "/home/cod/.local/lib/python3.8/site-packages/plexapi/server.py", line 340, in query
    response = method(url, headers=headers, timeout=timeout, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 519, in request
    prep = self.prepare_request(req)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 452, in prepare_request
    p.prepare(
  File "/usr/lib/python3/dist-packages/requests/models.py", line 313, in prepare
    self.prepare_url(url, params)
  File "/usr/lib/python3/dist-packages/requests/models.py", line 381, in prepare_url
    raise InvalidURL(*e.args)
requests.exceptions.InvalidURL: Failed to parse: http://127.0.0.1:32400/?X-Plex-Token=<hidden>

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