Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: simplejpeg Incompatibility with numpy Version >= 2.0.0 #408

Closed
3 tasks done
abhiTronix opened this issue Jun 20, 2024 · 2 comments
Closed
3 tasks done

[Bug]: simplejpeg Incompatibility with numpy Version >= 2.0.0 #408

abhiTronix opened this issue Jun 20, 2024 · 2 comments
Assignees
Labels
EXTERNAL BUG 👾 Bug caused by external dependent library SOLVED 🏁 This issue/PR is resolved now. Goal Achieved!

Comments

@abhiTronix
Copy link
Owner

abhiTronix commented Jun 20, 2024

Description

The backend simplejpeg library used in our WebGear and NetGear APIs primarily for frame compression, is not compatible with the newer versions of numpy (>= 2.0.0). The recent changes in numpy have introduced modifications that cause issues with the simplejpeg Turbo C API.

Issue Checklist

  • I have searched open or closed issues for my problem and found nothing related or helpful.
  • I have read the Documentation and found nothing related to my problem.
  • I've read the Issue Guidelines and wholeheartedly agree.

Expected behaviour

import simplejpeg should work out of the box

Actual behaviour

Currently, importing simplejpeg throws the following error:

>>> import simplejpeg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Abhishek Thakur\AppData\Roaming\Python\Python310\site-packages\simplejpeg\__init__.py", line 1, in <module>
    from ._jpeg import encode_jpeg
  File "simplejpeg\\_jpeg.pyx", line 1, in init simplejpeg._jpeg
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Steps to reproduce

  • Install numpy>=2.0.0 and simplejpeg
  • Call import simplejpeg

Terminal log output

>>> import simplejpeg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Abhishek Thakur\AppData\Roaming\Python\Python310\site-packages\simplejpeg\__init__.py", line 1, in <module>
    from ._jpeg import encode_jpeg
  File "simplejpeg\\_jpeg.pyx", line 1, in init simplejpeg._jpeg
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Python Code(Optional)

No response

VidGear Version

0.3.3

Python version

any

OpenCV version

latest

Operating System version

any

Any other Relevant Information?

jfolz/simplejpeg#2

@abhiTronix abhiTronix added EXTERNAL BUG 👾 Bug caused by external dependent library BUG CONFIRMED ✅ Bug is confirmed! WORKAROUND PRESENT 🆗 A workaround is present for this issue, but not resolved! labels Jun 20, 2024
@abhiTronix abhiTronix self-assigned this Jun 20, 2024
@abhiTronix

This comment was marked as outdated.

@abhiTronix abhiTronix pinned this issue Jun 20, 2024
@abhiTronix
Copy link
Owner Author

This issue is fixed with simplejpeg version 1.74.

@abhiTronix abhiTronix added SOLVED 🏁 This issue/PR is resolved now. Goal Achieved! and removed WORKAROUND PRESENT 🆗 A workaround is present for this issue, but not resolved! labels Jun 20, 2024
@abhiTronix abhiTronix unpinned this issue Jun 20, 2024
@abhiTronix abhiTronix removed the BUG CONFIRMED ✅ Bug is confirmed! label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EXTERNAL BUG 👾 Bug caused by external dependent library SOLVED 🏁 This issue/PR is resolved now. Goal Achieved!
Projects
None yet
Development

No branches or pull requests

1 participant