AssertionError: The library preference did not match the list of libraries #114

Closed
opened 2025-02-27 19:54:56 +01:00 by Ghost · 1 comment
Ghost commented 2025-02-27 19:54:56 +01:00 (Migrated from codeberg.org)
Traceback (most recent call last):
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
    raise exc
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 85, in __call__
    await self.app(scope, receive, send_wrapper)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/johnsturgeon/Code/autoplex/app/main.py", line 152, in preferences
    if plex_user.music_library:
       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/johnsturgeon/Code/autoplex/app/db/database.py", line 135, in music_library
    assert False, (
AssertionError: The library preference did not match the list of libraries
```python-traceback Traceback (most recent call last): File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__ raise exc File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__ await self.app(scope, receive, _send) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/middleware/sessions.py", line 85, in __call__ await self.app(scope, receive, send_wrapper) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__ await self.middleware_stack(scope, receive, send) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app await route.handle(scope, receive, send) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app response = await f(request) ^^^^^^^^^^^^^^^^ File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/johnsturgeon/Code/autoplex/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/johnsturgeon/Code/autoplex/app/main.py", line 152, in preferences if plex_user.music_library: ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/johnsturgeon/Code/autoplex/app/db/database.py", line 135, in music_library assert False, ( AssertionError: The library preference did not match the list of libraries ```
Ghost commented 2025-02-27 19:55:26 +01:00 (Migrated from codeberg.org)

Steps to reproduce:

  • set server and library in preferences
  • change the server
Steps to reproduce: - set server and library in preferences - change the server
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
johnsturgeon/autoplex#114
No description provided.