Skip to content

Docker image fails to work #6

Description

@alexander-potemkin

Any help would be much appreciated 🙏

I can see that docker image wasn't updated for 7 months now, while there been some fixes pushed recently - guess that might a root cause?

2025-08-12 15:34:14,449 - xrss - WARNING - Cookie file not found: cookies.json
2025-08-12 15:34:23,124 - xrss - ERROR - Error refreshing cache for ylecun: 'itemContent'
2025-08-12 15:34:23,125 - xrss - ERROR - Error in get_tweets: 'itemContent'
INFO:     192.168.0.4:59938 - "GET /feed.xml?usernames=ylecun&usernames=karpathy HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/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 "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 113, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/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 "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/xrss/main.py", line 330, in get_feed
    tweets_data = await get_tweets(
                  ^^^^^^^^^^^^^^^^^
  File "/app/xrss/main.py", line 266, in get_tweets
    all_tweets = await asyncio.gather(*tasks)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/xrss/main.py", line 82, in get_cached_tweets
    await refresh_user_tweets_cache(username)
  File "/app/xrss/main.py", line 139, in refresh_user_tweets_cache
    retweet_results = await asyncio.gather(*retweet_tasks)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/xrss/main.py", line 61, in rate_limited_request
    result = await coroutine
             ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/twikit/client/client.py", line 1606, in get_tweet_by_id
    reply_next_cursor = entries[-1]['content']['itemContent']['value']
                        ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'itemContent'
INFO:     192.168.0.4:35804 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO:     127.0.0.1:40918 - "GET /docs HTTP/1.1" 200 OK
2025-08-12 15:34:33,890 - xrss - ERROR - Error refreshing cache for karpathy: 'itemContent'
INFO:     127.0.0.1:59908 - "GET /docs HTTP/1.1" 200 OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions