g0ldyy / comet

Stremio's fastest torrent/debrid search add-on.
MIT License
196 stars 30 forks source link

New rls. broken #100

Closed Varming73 closed 2 months ago

Varming73 commented 2 months ago

After upgrading to the new version I get errors - lot's of them. Can't use Comet at all now. As new versions aren't released I don't think I can ever reverse to the previous version. Otherwise please tell me how.

2024-08-15 20:43:57 | ❌ ERROR | main.dispatch - Exception during request processing: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/anyio/streams/memory.py", line 105, in receive
    return self.receive_nowait()
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/anyio/streams/memory.py", line 100, in receive_nowait
    raise WouldBlock
anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/anyio/streams/memory.py", line 118, 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 "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 159, in call_next
    message = await recv_stream.receive()
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/anyio/streams/memory.py", line 120, in receive
    raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/comet/main.py", line 27, in dispatch
    response = await call_next(request)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/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 "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
  File "/app/comet/api/stream.py", line 251, in stream
    filtered_torrents = await asyncio.gather(*tasks)
  File "/app/comet/utils/general.py", line 428, in filter
    if "\n" in title:  # Torrentio title parsing
TypeError: argument of type 'NoneType' is not iterable
2024-08-15 20:43:57 | 👾 API | main.dispatch - GET /eyJpbmRleGVycyI6WyJiaXRzZWFyY2giXSwibWF4UmVzdWx0cyI6MCwibWF4U2l6ZSI6MCwicmVzb2x1dGlvbnMiOlsiNzIwcCIsIjEwODBwIiwiMTQ0MHAiLCIyMTYwcCIsIjRLIl0sImxhbmd1YWdlcyI6WyJBbGwiXSwiZGVicmlkU2VydmljZSI6InJlYWxkZWJyaWQiLCJkZWJyaWRBcGlLZXkiOiJLVlFOQ1UyTEQ3UTVKSVZITlFRWFNHU0xIWDRKSkpDQVNBQTIyWkdBSUpRQ1lJM0FBTTJRIiwiZGVicmlkU3RyZWFtUHJveHlQYXNzd29yZCI6Ik1pVGExMjA1MDYifQ==/stream/movie/tt13433802.json - 500 - 5.73s
Exception in ASGI application
  + Exception Group Traceback (most recent call last):
  |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_utils.py", line 87, in collapse_excgroups
  |     yield
  |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 190, in __call__
  |     async with anyio.create_task_group() as task_group:
  |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 680, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
    |     result = await app(  # type: ignore[func-returns-value]
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    |     return await self.app(scope, receive, send)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    |     await super().__call__(scope, receive, send)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    |     raise exc
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    |     await self.app(scope, receive, _send)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in __call__
    |     await self.simple_response(scope, receive, send, request_headers=headers)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    |     await self.app(scope, receive, send)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/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 "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    |     raise exc
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    |     response = await self.dispatch_func(request, call_next)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/comet/main.py", line 27, in dispatch
    |     response = await call_next(request)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    |     raise app_exc
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    |     await self.app(scope, receive_or_disconnect, send_no_error)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/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 "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
    |     await self.middleware_stack(scope, receive, send)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    |     await route.handle(scope, receive, send)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    |     await self.app(scope, receive, send)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    |     raise exc
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    |     await app(scope, receive, sender)
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
    |     response = await func(request)
    |                ^^^^^^^^^^^^^^^^^^^
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
    |     raw_response = await run_endpoint_function(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    |     return await dependant.call(**values)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/comet/api/stream.py", line 251, in stream
    |     filtered_torrents = await asyncio.gather(*tasks)
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/comet/utils/general.py", line 428, in filter
    |     if "\n" in title:  # Torrentio title parsing
    |        ^^^^^^^^^^^^^
    | TypeError: argument of type 'NoneType' is not iterable
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/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 "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/comet/main.py", line 27, in dispatch
    response = await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/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 "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.cache/pypoetry/virtualenvs/comet-9TtSrW0h-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/comet/api/stream.py", line 251, in stream
    filtered_torrents = await asyncio.gather(*tasks)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/comet/utils/general.py", line 428, in filter
    if "\n" in title:  # Torrentio title parsing
       ^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable
Varming73 commented 2 months ago

Sorry, I just downgraded Zilean and it seems the problem is only there when running the new Postgres versions of Zilean. The old Elasticsearch versions work perfectly with Comet.