maykar / plex_assistant

❱ Plex Assistant is a Home Assistant integration for casting Plex media to Google devices, Sonos devices, and Plex clients with Google Assistant, HA's conversation integration, and more.
MIT License
281 stars 60 forks source link

Failed to set up Custom Component #155

Open Deathbot64 opened 2 years ago

Deathbot64 commented 2 years ago

Fresh install of home assistant and Plex Assistant always failed to install. Same with an older Home Assistant Build I am using

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/plex_assistant/plex_assistant.py:37
Integration: Plex Assistant (documentation)
First occurred: January 1, 2022, 6:31:18 PM (1 occurrences)
Last logged: January 1, 2022, 6:31:18 PM

Error setting up entry http://plex.deathbot64thearchive.duckdns.org:32400 for plex_assistant
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/plex_assistant/__init__.py", line 79, in async_setup_entry
    pa = await hass.async_add_executor_job(pa_executor, server, list(start_script.keys()))
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/plex_assistant/__init__.py", line 76, in pa_executor
    _LOGGER.debug(f"Media titles: {len(_pa.media['all_titles'])}")
  File "/config/custom_components/plex_assistant/plex_assistant.py", line 37, in media
    media_items[f"{item}_titles"] = [x.title for x in self.library.search(libtype=item, sort="addedAt:desc")]
  File "/usr/local/lib/python3.9/site-packages/plexapi/library.py", line 106, in search
    return self.fetchItems(key)
  File "/usr/local/lib/python3.9/site-packages/plexapi/base.py", line 260, in fetchItems
    data = self._server.query(ekey, params=url_kw)
  File "/usr/local/lib/python3.9/site-packages/plexapi/server.py", line 669, in query
    raise BadRequest(message)
plexapi.exceptions.BadRequest: (500) internal_server_error; http://plex.deathbot64thearchive.duckdns.org:32400/library/all?sort=addedAt%3Adesc&type=10 <html><head><title>Internal Server Error</title></head><body><h1>500 Internal Server Error</h1></body></html>
github-actions[bot] commented 2 years ago

Important:

Issues that don't provide the information requested in the troubleshooting docs may not get a reply and may be closed until the info is provided. Please, include as much of the requested info as possible so that I can replicate and investigate your issue.

When pasting in your config/code/errors always place 3 backticks ``` above the first line and after the last line. Doing this will format it correctly.