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

stubgen crash when a referenced module is a DLL #14028

Closed
Avasam opened this issue Nov 7, 2022 · 2 comments · Fixed by #14503
Closed

stubgen crash when a referenced module is a DLL #14028

Avasam opened this issue Nov 7, 2022 · 2 comments · Fixed by #14503

Comments

@Avasam
Copy link
Contributor

Avasam commented Nov 7, 2022

Crash Report
Same as #13822 (#13822 (comment)), but for stubgen. I've just tried it out in 0.990
stubgen crashes when a referenced module is a DLL, as it seemingly tries to parse the .dll's content as text.

Traceback

PS C:\Users\Avasam\Documents\Git\typeshed> stubgen -p pywintypes
Critical error during semantic analysis: mypy: can't decode file 'C:\Users\Avasam\Documents\Git\typeshed\.venv\Lib\site-packages\pywin32_system32\pywintypes39.dll': 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte

To Reproduce
pip install pywin32
stubgen -p pywintypes

Your Environment

  • Mypy version used: 0.990 (compiled: yes)
  • Mypy command-line flags: (see above)
  • Mypy configuration options from mypy.ini (and other config files): (see above)
  • Python version used: 3.9.13
  • Operating system and version: Windows 10.0.19044 Build 19044
@Avasam Avasam added the crash label Nov 7, 2022
@hauntsaninja
Copy link
Collaborator

Thanks, want to make a PR? :-)

@Avasam
Copy link
Contributor Author

Avasam commented Nov 7, 2022

Given how simple the fix you did for stubtest was, sure, I can try it out.

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