Karl Richter added the comment: Then, let the error message say "You are opening a just-created empty file. The db type of the file cannot, therefore, be determined." which is much clearer than "anydbm.error: db type could not be determined" which sounds like a generic fallback error message in "an error occured"-style.
It seems to be necessary that the filename passed to `shelve.open` has a suffix which is not very intuitive for Linux users. It'd be great to have validation of the suffix and raise a `ValueError` with an error message like `"filename '%s' doesn't contain a suffix" % (filename,)` when it isn't supplied. If there's another issue regarding the fact that the file is "just-created" and empty, this is independent of the issue above. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23174> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com