Skip to content
New issue

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

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

Already on GitHub? # to your account

cv2.typing module is missing from generated wheels #869

Closed
4 tasks done
Avasam opened this issue Jul 4, 2023 · 7 comments
Closed
4 tasks done

cv2.typing module is missing from generated wheels #869

Avasam opened this issue Jul 4, 2023 · 7 comments
Assignees

Comments

@Avasam
Copy link

Avasam commented Jul 4, 2023

Expected behaviour

Since opencv/opencv#23798 , OpenCV should have a typing module available at runtime. It used to be a type-stub-only and was included as part of dev wheels I downloaded last month from GitHub Actions.

Actual behaviour

cv2/typing/__init__.py is missing.

Steps to reproduce

  • pip install opencv-python-headless==4.8.0.74
  • Notice the lack of cv2.typing
>>> import cv2.typing
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2.typing'

image

Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency") I think so, assuming it isn't an issue with how OpenCV generates the module.
  • I'm using the latest version of opencv-python
@asmorkalov
Copy link
Collaborator

Confirmed. typing/__init__.pyi was renamed to typing/__init__.py and I forgot to add it to package. Fixed in #870

@asmorkalov asmorkalov self-assigned this Jul 5, 2023
@Avasam Avasam mentioned this issue Aug 6, 2023
4 tasks
@asmorkalov asmorkalov pinned this issue Aug 7, 2023
@asmorkalov
Copy link
Collaborator

FIxed in 4.8.0.76 release.

@asmorkalov asmorkalov unpinned this issue Aug 10, 2023
@amandeep75
Copy link

in 4.8.0.76 This gives another issue
AttributeError: module 'cv2.dnn' has no attribute 'DictValue'

@Cassieyy
Copy link

Cassieyy commented May 6, 2024

in 4.8.0.76 This gives another issue AttributeError: module 'cv2.dnn' has no attribute 'DictValue'

same error, have some solutions?

@ssuai
Copy link

ssuai commented Dec 12, 2024

import cv2
print(cv2.__version__)

4.10.0

@Cassieyy
Copy link

Cassieyy commented Dec 12, 2024 via email

@qwerty3564
Copy link

in 4.8.0.76 This gives another issue AttributeError: module 'cv2.dnn' has no attribute 'DictValue'

same error, have some solutions?

我也遇到了,请问你解决没

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants