Message383229
Shelve module uses "import dbm" instruction while opening database. Dbm module has global dictionary "_modules". This dictionary modifies during database opening operation. When different threads simultaneously try to open different databases, unexpected behavior occurred. In my case I've got such message:
with shelve.open('some_file') as f:
File "/usr/local/lib/python3.6/shelve.py", line 243, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/local/lib/python3.6/shelve.py", line 227, in init
Shelf.init(self, dbm.open(filename, flag), protocol, writeback)
File "/usr/local/lib/python3.6/dbm/__init__.py", line 94, in open
return mod.open(file, flag, mode)
AttributeError: module 'dbm.ndbm' has no attribute 'open'
Behavior is the same on python 3.6 and 3.7. Error is spontaneous. |
|
Date |
User |
Action |
Args |
2020-12-17 11:05:17 | gardener.willy | set | recipients:
+ gardener.willy |
2020-12-17 11:05:17 | gardener.willy | set | messageid: <1608203117.3.0.00404135488038.issue42667@roundup.psfhosted.org> |
2020-12-17 11:05:17 | gardener.willy | link | issue42667 messages |
2020-12-17 11:05:17 | gardener.willy | create | |
|