question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValueError: array.array size changed, may indicate binary incompatibility on PyPy

See original GitHub issue

Importing pyproj 3.0.1 on PyPy for Windows raises the following error:

Python 3.7.10 (77787b8f4c49, May 15 2021, 11:51:36)
[PyPy 7.3.5 with MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>> import pyproj
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "X:\pypy3\site-packages\pyproj\__init__.py", line 64, in <module>
    from pyproj.proj import Proj, pj_list  # noqa: F401
  File "X:\pypy3\site-packages\pyproj\proj.py", line 21, in <module>
    from pyproj._transformer import Factors, _Transformer
  File "pyproj\_transformer.pyx", line 1, in init pyproj._transformer
ValueError: array.array size changed, may indicate binary incompatibility. Expected 72 from C header, got 24 from PyObject

The issue is that there is “no clean C interface to the array.array object in Python”. See discussion at https://github.com/h5py/h5py/issues/1514 and https://github.com/h5py/h5py/pull/1515 for a possible fix.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
cgohlkecommented, Feb 5, 2022

I have once again recompiled the pyproj package for PyPy and it is importing again. I think this issue is due to Cython producing incompatible versions of C files when cythonizing on CPython vs PyPy, which makes it hard and error prone to build CPython and PyPy wheels from the same copy of the source without removing the cythonized files in between builds.

1reaction
cgohlkecommented, Oct 30, 2021

Thank you! Do you think it is safe to start building for pypy3.8-v7.3.7?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: numpy.ndarray size changed, may indicate binary ...
I'm in Python 3.8.5. It sounds too simple to be real, but I had this same issue and all I did was reinstall...
Read more >
Binary incompatibility with Kivy and Pypy 3.7.5 - Google Groups
Binary incompatibility with Kivy and Pypy 3.7.5. 50 views ... ValueError: array.array size changed, may indicate binary incompatibility.
Read more >
cython / array.array bindings generate errors - PyPy - Heptapod
Why https://github.com/shlomif/primesieve-python/tree/array-pypy3 (note ... array.array size changed, may indicate binary incompatibility.
Read more >
ValueError: numpy.ndarray size changed, may indicate binary ...
I'm answering to my own question. numpy >=1.20 is not available from Bullseye repository. So I decided to install it from pypi through...
Read more >
ValueError: numpy.ndarray size changed, may indicate binary ...
[Code]-ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject-pandas ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found