rivenmedia / riven

Handle your Media Library with ease!
https://rivenmedia.github.io/wiki/
GNU General Public License v3.0
396 stars 54 forks source link

ERROR: An error occurred while deleting the media #874

Open trulow opened 1 week ago

trulow commented 1 week ago

When trying to delete a movie that was added via Overseerr, the following error occurs

An error occurred while deleting the media

The media is only indexed and was never pulled. There are no symlinks created for the movie in question.

Backend version 0.18.0 Frontend version 0.17.0

Logs:

`24-11-09 10:13:56 | โŒ ERROR | main.dispatch - Exception during request processing: type object 'Overseerr' has no attribute 'delete_request' Traceback (most recent call last): File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 111, in receive return self.receive_nowait() File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 106, in receive_nowait raise WouldBlock anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 124, in receive return receiver.item AttributeError: 'MemoryObjectItemReceiver' object has no attribute 'item'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 159, in call_next message = await recv_stream.receive() File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 126, in receive raise EndOfStream anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/riven/src/main.py", line 29, in dispatch response = await call_next(request) File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 756, in call await self.middleware_stack(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 776, in app await route.handle(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle await self.app(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 72, in app response = await func(request) File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app raw_response = await run_endpoint_function( File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function return await dependant.call(**values) File "/riven/src/routers/secure/items.py", line 357, in remove_item Overseerr.delete_request(requested_id) AttributeError: type object 'Overseerr' has no attribute 'delete_request' 24-11-09 10:13:57 | ๐Ÿ‘พ API | main.dispatch - DELETE /api/v1/items/remove - 500 - 0.29s Exception in ASGI application

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in call raise exc File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in call await self.app(scope, receive, _send) File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in call await self.app(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in call with collapse_excgroups(): File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "/app/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups raise exc File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in call response = await self.dispatch_func(request, call_next) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/riven/src/main.py", line 29, in dispatch response = await call_next(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next raise app_exc File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 756, in call await self.middleware_stack(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 776, in app await route.handle(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle await self.app(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 72, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/riven/src/routers/secure/items.py", line 357, in remove_item Overseerr.delete_request(requested_id) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: type object 'Overseerr' has no attribute 'delete_request' `

jprak-dotcom commented 3 days ago

I am facing same issue:

24-11-18 23:03:33 | ๐Ÿž DEBUG     | items.remove_item - Removing item with ID movie_1013634

24-11-18 23:03:33 | ๐Ÿž DEBUG     | event_manager.cancel_job - Canceled jobs for Item ID movie_1013634 and its children.

24-11-18 23:03:33 | ๐Ÿž DEBUG     | symlink._delete_symlink - Symlink Directory for Europa does not exist, skipping symlink deletion

24-11-18 23:03:33 | ๐Ÿž DEBUG     | items.remove_item - Deleting request from Overseerr with ID 114

24-11-18 23:03:33 | โŒ ERROR     | main.dispatch - Exception during request processing: type object 'Overseerr' has no attribute 'delete_request'

Traceback (most recent call last):

  File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 111, in receive

    return self.receive_nowait()

  File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 106, in receive_nowait

    raise WouldBlock

anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 124, in receive

    return receiver.item

AttributeError: 'MemoryObjectItemReceiver' object has no attribute 'item'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 159, in call_next

    message = await recv_stream.receive()

  File "/app/.venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 126, in receive

    raise EndOfStream

anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/riven/src/main.py", line 29, in dispatch

    response = await call_next(request)

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next

    raise app_exc

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro

    await self.app(scope, receive_or_disconnect, send_no_error)

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__

    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app

    raise exc

  File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

    await app(scope, receive, sender)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__

    await self.middleware_stack(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 776, in app

    await route.handle(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle

    await self.app(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 77, in app

    await wrap_app_handling_exceptions(app, request)(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app

    raise exc

  File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

    await app(scope, receive, sender)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 72, in app

    response = await func(request)

  File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app

    raw_response = await run_endpoint_function(

  File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function

    return await dependant.call(**values)

  File "/riven/src/routers/secure/items.py", line 358, in remove_item

    Overseerr.delete_request(requested_id)

AttributeError: type object 'Overseerr' has no attribute 'delete_request'

24-11-18 23:03:33 | ๐Ÿ‘พ API       | main.dispatch - DELETE /api/v1/items/remove - 500 - 0.29s

Exception in ASGI application

  + Exception Group Traceback (most recent call last):

  |   File "/app/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups

  |     yield

  |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__

  |     async with anyio.create_task_group() as task_group:

  |   File "/app/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 763, in __aexit__

  |     raise BaseExceptionGroup(

  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)

  +-+---------------- 1 ----------------

    | Traceback (most recent call last):

    |   File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi

    |     result = await app(  # type: ignore[func-returns-value]

    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    |   File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__

    |     return await self.app(scope, receive, send)

    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    |   File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__

    |     await super().__call__(scope, receive, send)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__

    |     await self.middleware_stack(scope, receive, send)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__

    |     raise exc

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__

    |     await self.app(scope, receive, _send)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__

    |     await self.app(scope, receive, send)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__

    |     with collapse_excgroups():

    |   File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__

    |     self.gen.throw(typ, value, traceback)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups

    |     raise exc

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__

    |     response = await self.dispatch_func(request, call_next)

    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    |   File "/riven/src/main.py", line 29, in dispatch

    |     response = await call_next(request)

    |                ^^^^^^^^^^^^^^^^^^^^^^^^

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next

    |     raise app_exc

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro

    |     await self.app(scope, receive_or_disconnect, send_no_error)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__

    |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app

    |     raise exc

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

    |     await app(scope, receive, sender)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__

    |     await self.middleware_stack(scope, receive, send)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 776, in app

    |     await route.handle(scope, receive, send)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle

    |     await self.app(scope, receive, send)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 77, in app

    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app

    |     raise exc

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

    |     await app(scope, receive, sender)

    |   File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 72, in app

    |     response = await func(request)

    |                ^^^^^^^^^^^^^^^^^^^

    |   File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app

    |     raw_response = await run_endpoint_function(

    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    |   File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function

    |     return await dependant.call(**values)

    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    |   File "/riven/src/routers/secure/items.py", line 358, in remove_item

    |     Overseerr.delete_request(requested_id)

    |     ^^^^^^^^^^^^^^^^^^^^^^^^

    | AttributeError: type object 'Overseerr' has no attribute 'delete_request'

    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/app/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi

    result = await app(  # type: ignore[func-returns-value]

             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__

    return await self.app(scope, receive, send)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__

    await super().__call__(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__

    await self.middleware_stack(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__

    raise exc

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__

    await self.app(scope, receive, _send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__

    await self.app(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__

    with collapse_excgroups():

  File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__

    self.gen.throw(typ, value, traceback)

  File "/app/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups

    raise exc

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__

    response = await self.dispatch_func(request, call_next)

               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/riven/src/main.py", line 29, in dispatch

    response = await call_next(request)

               ^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next

    raise app_exc

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro

    await self.app(scope, receive_or_disconnect, send_no_error)

  File "/app/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__

    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app

    raise exc

  File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

    await app(scope, receive, sender)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__

    await self.middleware_stack(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 776, in app

    await route.handle(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle

    await self.app(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 77, in app

    await wrap_app_handling_exceptions(app, request)(scope, receive, send)

  File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app

    raise exc

  File "/app/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app

    await app(scope, receive, sender)

  File "/app/.venv/lib/python3.11/site-packages/starlette/routing.py", line 72, in app

    response = await func(request)

               ^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app

    raw_response = await run_endpoint_function(

                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function

    return await dependant.call(**values)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/riven/src/routers/secure/items.py", line 358, in remove_item

    Overseerr.delete_request(requested_id)

    ^^^^^^^^^^^^^^^^^^^^^^^^

AttributeError: type object 'Overseerr' has no attribute 'delete_request'