Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unable to open file '%s' for index storage" - Write permissions on index should not be required #280

Closed
jason-curtis opened this issue Sep 12, 2023 · 1 comment

Comments

@jason-curtis
Copy link

I have an application which uses rtree and a .idx index file. The index is pre-cached in my filesystem and doesn't need to be updated. The system is running on AWS Lambda so the user doesn't have write permissions to the source directory.

However, rtree checks explicitly that the directory is writeable:

rtree/rtree/index.py

Lines 247 to 250 in 68cb6ac

d = os.path.dirname(p)
if not os.access(d, os.W_OK):
message = "Unable to open file '%s' for index storage" % f
raise OSError(message)

This is crashing my program. Is there a way to tell rtree to treat the index as read-only?

@jason-curtis
Copy link
Author

oops, closing as duplicate of #247

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

No branches or pull requests

1 participant