Skip to content

Error in flush #10

@nicolas-popsize

Description

@nicolas-popsize

Hi. I think my script has crashed yesterday.
When relaunching:

  File "xxxxxxxxxxxxxappxxxxxxxxxxxxx.py", line 56, in <module>
    from app.services.popsize_scraping.scrape_productlists import scrape_productlist
  File "xxxxxxxxxxxxxxxxxxxxxxxxxxxxs.py", line 110, in <module>
    def last_visited_url(url: str) -> datetime.datetime:
  File "xxxxxxxxxxxxx.venv/lib/python3.10/site-packages/persist_cache/persist_cache.py", line 51, in decorator
    caching.flush(dir, expiry)
  File "xxxxxxxxxxxxx.venv/lib/python3.10/site-packages/persist_cache/caching.py", line 105, in flush
    timestamp = datetime.fromtimestamp(os.path.getmtime(path))
  File "/usr/lib/python3.10/genericpath.py", line 55, in getmtime
    return os.stat(filename).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '.persist_cache/2fd3aa0508f4dad017/f9ec429e2ab3ac09681995086515704567.msgpack'
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1755677317.462727   11097 init.cc:229] grpc_wait_for_shutdown_with_timeout() timed out.

I deleted the cache of this function manually to solve it. But maybe it should be automatic when a corrpt state like this is found?

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