You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This situation is a case of the problem described in #128.
Basically, under the hood, pd.HDFStore is likely using open(filename, ...) in write mode. Unfortunately, while cloudpathlib supports open, it only works as expected in read mode and not write mode. Both cases operate on the local cache file. Read is fine, because cloudpathlib will attempt to sync down the file from the cloud before opening. Write does not work, because the changes only get written to the local cache file, and cloudpathlib does not sync back up. This is reflected in the OverwriteNewerLocalError that you get later, because your local cache file has diverged from the cloud version.
One workaround is to read and write to a manually set local path, and use CloudPath.upload_from to write up to the cloud.
Activity
jayqi commentedon Jul 18, 2022
This situation is a case of the problem described in #128.
Basically, under the hood,
pd.HDFStoreis likely usingopen(filename, ...)in write mode. Unfortunately, while cloudpathlib supportsopen, it only works as expected in read mode and not write mode. Both cases operate on the local cache file. Read is fine, because cloudpathlib will attempt to sync down the file from the cloud before opening. Write does not work, because the changes only get written to the local cache file, and cloudpathlib does not sync back up. This is reflected in theOverwriteNewerLocalErrorthat you get later, because your local cache file has diverged from the cloud version.One workaround is to read and write to a manually set local path, and use
CloudPath.upload_fromto write up to the cloud.