[pypy-issue] Issue #2511: Refcheck error using latest pandas 0.9.12 with PyPy 5.7.0 (pypy/pypy)

David Moss issues-reply at bitbucket.org
Wed Mar 22 07:05:41 EDT 2017

New issue 2511: Refcheck error using latest pandas 0.9.12 with PyPy 5.7.0

David Moss:

A very simple and innocuous looking bit of pandas code is failing with the latest official release of PyPy running the latest version of pandas.



» pypy --version
Python 2.7.13 (fa3249d55d15, Mar 19 2017, 19:48:32)
[PyPy 5.7.0 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]

» pypy -c 'import pandas; print(pandas.__version__)'

**Minimal Test Case**


import pandas as pd
df = pd.DataFrame({'x': ['a', 'b', 'b']})


It generate the following error.


Traceback (most recent call last):
  File "refcheck_error.py", line 3, in <module>
  File "/Users/dm/pypy-latest/site-packages/pandas/core/series.py", line 1241, in unique
    result = super(Series, self).unique()
  File "/Users/dm/pypy-latest/site-packages/pandas/core/base.py", line 973, in unique
    result = unique1d(values)
  File "/Users/dm/pypy-latest/site-packages/pandas/core/nanops.py", line 811, in unique1d
    uniques = table.unique(_ensure_object(values))
  File "pandas/src/hashtable_class_helper.pxi", line 826, in pandas.hashtable.PyObjectHashTable.unique (pandas/hashtable.c:14521)
ValueError: cannot resize an array with refcheck=True on PyPy.
Use the resize function or refcheck=False


Runs quite happily under CPython on the same system.

More information about the pypy-issue mailing list