[New-bugs-announce] [issue31125] shelve.open of temporary file fails with error "anydbm.error: db type could not be determined"

Stephen Larroque report at bugs.python.org
Sat Aug 5 12:26:59 EDT 2017


New submission from Stephen Larroque:

This is a followup of issue 23174.

When using `shelve.open(tempfile.mkstemp()[1])`, the shelve (or anydbm or dumbdbm) fail with "anydbm.error: db type could not be determined".

Instead, the module could detect the file is empty and use it as if it were not existing before ('c' or 'n' flag). For the moment, there is no way around except creating the temporary file and then delete it.

----------
components: IO
messages: 299790
nosy: Stephen Larroque
priority: normal
severity: normal
status: open
title: shelve.open of temporary file fails with error "anydbm.error: db type could not be determined"
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31125>
_______________________________________


More information about the New-bugs-announce mailing list