Skip to content

Conversation

eighteyes
Copy link
Contributor

Using Contextily in a managed serverless environment removes the tmp directory before atexit fires, which results in the following error. Which, I wager means it can't find the indicated directory to delete.

Traceback (most recent call last):
  File "/layers/google.python.pip/pip/lib/python3.11/site-packages/contextily/tile.py", line 61, in _clear_cache
    shutil.rmtree(tmpdir)
  File "/layers/google.python.runtime/python/lib/python3.11/shutil.py", line 742, in rmtree
    onerror(os.lstat, path, sys.exc_info())
  File "/layers/google.python.runtime/python/lib/python3.11/shutil.py", line 740, in rmtree
    orig_st = os.lstat(path, dir_fd=dir_fd) 

I can put our invocation behind a try-catch, or otherwise ignore this error, but an upstream patch would be preferable.

Thanks!

Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will cut a minor patch release so it does not block you.

@martinfleis martinfleis merged commit a0b1a32 into geopandas:main Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants