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
You cannot open a non-existent ZipStore in r mode, because zipfile.ZipFile.__init__ will fail to find the zip file on disk and raise an exception. This is obvious given how files work, but surprising in the context of the other Store classes, which can all be opened in r mode without any IO (I think).
The text was updated successfully, but these errors were encountered:
The existing behavior feels like a good place to be but I'm curious if you think we should delay alerting the user when their store does not exist? What sort of behavior are do you think makes sense?
Other than raising an exception on init (the status quo), the only other option would be to create an empty zip file, which will contain nothing and therefore be rather useless as long as the mode is 'r'. I don't know which of these two is more natural for users.
If we keep the status quo, we should probably at least handle the FileNotFoundError raised from ZipFile and include some information about how you have to first create the zip file before it can be opened in r mode.
You cannot open a non-existent
ZipStore
inr
mode, becausezipfile.ZipFile.__init__
will fail to find the zip file on disk and raise an exception. This is obvious given how files work, but surprising in the context of the otherStore
classes, which can all be opened inr
mode without any IO (I think).The text was updated successfully, but these errors were encountered: