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

0.990 internal error "IsADirectoryError" when not having __init__.py files #14046

Closed
osteenbergen opened this issue Nov 9, 2022 · 3 comments · Fixed by #14063
Closed

0.990 internal error "IsADirectoryError" when not having __init__.py files #14046

osteenbergen opened this issue Nov 9, 2022 · 3 comments · Fixed by #14063
Labels

Comments

@osteenbergen
Copy link

Crash Report

MyPy 0.981 was working fine, since update to latest 0.990 it crashes. Adding __init__.py to folders seems to solve it

Traceback

version: 0.990
Traceback (most recent call last):
  File "/home/osteenbergen/Documents/semiotic-iot/.tox/mypy/bin/mypy", line 8, in <module>
    sys.exit(console_entry())
  File "mypy/build.py", line 2067, in wrap_context
  File "mypy/build.py", line 2393, in finish_passes
  File "mypy/build.py", line 876, in report_file
  File "mypy/report.py", line 91, in file
  File "mypy/report.py", line 640, in on_file
  File "/usr/lib/python3.8/tokenize.py", line 392, in open
    buffer = _builtin_open(filename, 'rb')
IsADirectoryError: [Errno 21] Is a directory: 'tests/testresources/monitor'

To Reproduce

Folder structure

tests/example.py

example.py

print("Hello World!")

Your Environment

  • Mypy version used: 0.990
  • Mypy command-line flags: --config-file mypy.ini -p tests
  • Mypy configuration options from mypy.ini (and other config files):
[mypy]
check_untyped_defs = True
disallow_any_generics = True
disallow_incomplete_defs = True
disallow_subclassing_any = True
disallow_untyped_calls = True
disallow_untyped_decorators = True
disallow_untyped_defs = True
ignore_missing_imports = True
no_implicit_optional = True
no_implicit_reexport = True
show_error_codes = True
strict_equality = True
warn_redundant_casts = True
warn_return_any = True
warn_unused_configs = True
warn_unused_ignores = True

cobertura_xml_report = mypy_report
html_report = mypy_report
  • Python version used: 3.8.13
  • Operating system and version: Ubuntu 20.04
@osteenbergen
Copy link
Author

If i remove the report generation from the mypy.ini it works.

@hauntsaninja
Copy link
Collaborator

Thanks, similar to #13733

@hauntsaninja
Copy link
Collaborator

--no-namespace-packages is an alternative way to get unblocked

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