[issue30388] ndbm can't iterate through values on OS X

Forest Gregg report at bugs.python.org
Wed May 17 12:03:55 EDT 2017


New submission from Forest Gregg:

On Mac OS 10.12.4, a large shelve, backed by ndbm, can be created. But when I attempt to iterate through the values of the shelve it raises this exception:


  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/dedupe/api.py", line 281, in _blockData
    for block in viewvalues(blocks):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_collections_abc.py", line 693, in __iter__
    for key in self._mapping:
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shelve.py", line 95, in __iter__
    for k in self.dict.keys():
SystemError: Negative size passed to PyBytes_FromStringAndSize

I've confirmed that this works with Python 3.6.1. All the Python versions were installed from homebrew.

I cannot reproduce on linux on windows machines. I've attached a zip file of the ndbm files that python created.

----------
components: Library (Lib)
files: ndbm.zip
messages: 293858
nosy: Forest Gregg
priority: normal
severity: normal
status: open
title: ndbm can't iterate through values on OS X
versions: Python 3.5
Added file: http://bugs.python.org/file46872/ndbm.zip

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


More information about the Python-bugs-list mailing list