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

cv2.mat_wrapper INTERNAL ERROR #17542

Closed
iurisilvio opened this issue Jul 19, 2024 · 2 comments · Fixed by #17543
Closed

cv2.mat_wrapper INTERNAL ERROR #17542

iurisilvio opened this issue Jul 19, 2024 · 2 comments · Fixed by #17543
Labels

Comments

@iurisilvio
Copy link

Crash Report

My project fails with mypy 1.11.0, but works with 1.10.1.

It is open source, you can check the job failing here.

Traceback

$ mypy . --show-traceback
roboflow-python/lib/python3.11/site-packages/cv2/mat_wrapper/__init__.py:9: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.11.0
Traceback (most recent call last):
  File "mypy/checkexpr.py", line 5830, in accept
  File "mypy/nodes.py", line 2028, in accept
  File "mypy/checkexpr.py", line 4270, in visit_index_expr
  File "mypy/checkexpr.py", line 4286, in visit_index_expr_helper
  File "mypy/checkexpr.py", line 4345, in visit_index_with_type
  File "mypy/checkexpr.py", line 5863, in named_type
  File "mypy/checker.py", line 6924, in named_type
  File "mypy/checker.py", line 7048, in lookup_qualified
KeyError: "Failed qualified lookup: 'GenericAlias' (fullname = 'types.GenericAlias')."
roboflow-python/lib/python3.11/site-packages/cv2/mat_wrapper/__init__.py:9: : note: use --pdb to drop into pdb

To Reproduce

I reproduced local too, just run mypy on my project.

@hauntsaninja
Copy link
Collaborator

Thanks for the issue.

Here's a minimal repro:

pip install opencv-python-headless
mypy -c 'import cv2; reveal_type(cv2.imdecode)' --python-version 3.8 --show-traceback 

Bisects to #17404, cc @JukkaL

hauntsaninja added a commit to hauntsaninja/mypy that referenced this issue Jul 20, 2024
@hauntsaninja
Copy link
Collaborator

Okay, it's an easy fix #17543

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

Successfully merging a pull request may close this issue.

2 participants