-
Notifications
You must be signed in to change notification settings - Fork 69
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
[FIX] Addons - Do not use cache when no permission to write #288
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #288 +/- ##
==========================================
+ Coverage 75.47% 75.57% +0.09%
==========================================
Files 99 99
Lines 21033 21047 +14
==========================================
+ Hits 15875 15906 +31
+ Misses 5158 5141 -17
☔ View full report in Codecov by Sentry. |
except OperationalError: | ||
# if no permission to write in dir or read cache file return uncached session | ||
return requests.Session() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe log a warning when caching failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
76a6091
to
6afe257
Compare
6afe257
to
df4eea4
Compare
Is this due to running with sudo? |
I don't think so. It is a corporate computer with limited permissions. We don't know exactly why it is happening, but we will try to find out at the next meeting with them. |
@ales-erjavec, some explanation of what was happening. We built a conda installer for one of the companies. The installer also included orange3-imageanayitics with the wrong name for the requests-cache package in the recipe (requests_cache instead of requests-cache). It caused request-caches to be installed and requests_cache beside, which is an ancient version of the same package (0.4.3). This version overrode the new version and caused the database file to fail to open when networkcache folder still didn't exist I fixed the issue with imageanalytics here: conda-forge/orange3-imageanalytics-feedstock#33. |
Issue
On some corporate computers, it may be the issue that either the cache directory doesn't have permission to write or an existing cache file lacks reading permission. It happened to one of our customers. The cache file was successfully created, but the next time it tried to be read, it no longer had permissions.
Changes
When there is no read or write permission, ignore the cache.