Skip to content

Internal error depending on mypy_path in setup.cfg file #8770

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

Closed
demmerichs opened this issue May 4, 2020 · 1 comment
Closed

Internal error depending on mypy_path in setup.cfg file #8770

demmerichs opened this issue May 4, 2020 · 1 comment
Labels
crash topic-configuration Configuration files and flags

Comments

@demmerichs
Copy link

  • Are you reporting a bug, or opening a feature request?

    Bug

  • Please insert below the code you are checking with mypy,
    or a mock-up repro if the source is private. We would appreciate
    if you try to simplify your case to a minimal repro.

    Sadly, I was unable to produce a minimal example and I cannot share my code that easily unfortunatly. So I know that help can be limited, but I have an interesting observation.

  • What is the actual behavior/output?

    When I run mypy on a sub-level __init__.py file it throws an internal error depending on the contents of mypy_path in the config file.

  • What is the behavior/output you expect?

    At least a behavior that is independent of my changes to the mypy_path as all point to the same path on my system (see details on path structure following).

  • What are the versions of mypy and Python you are using?
    Do you see the same issue after installing mypy from Git master?

    I did not try mypy Git master, as the most recent version I am using 0.770 is quite recent. For python I use 3.6.9.

  • What are the mypy flags you are using? (For example --strict-optional)

Well, I use --config-file setup.cfg with the following relevant content. Notice the different settings for the mypy_path value. Both point to the same directory, as I execute mypy on the file src/xxsflow/utils/__init__.py from the working directory /lhome/davidj2/code/sync/space_and_deformable_time:

[mypy]
mypy_path = ./src   # <- this is the setting that produces the INTERNAL ERROR
#mypy_path = /lhome/davidj2/code/sync/space_and_deformable_time/src:./src  # <- no error (except for valid type errors)
namespace_packages = True

[mypy-numpy]
ignore_missing_imports = True
[mypy-tensorflow.*]
ignore_missing_imports = True
[mypy-pptk]
ignore_missing_imports = True
[mypy-scipy.*]
ignore_missing_imports = True
[mypy-psutil]
ignore_missing_imports = True
  • If mypy crashed with a traceback, please paste
    the full traceback below.
src/xxsflow/utils/__init__.py:54: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.770
Traceback (most recent call last):
  File "mypy/checker.py", line 401, in accept
  File "mypy/nodes.py", line 1062, in accept
  File "mypy/checker.py", line 2011, in visit_assignment_stmt
  File "mypy/checker.py", line 2073, in check_assignment
  File "mypy/checker.py", line 2246, in check_compatibility_all_supers
  File "mypy/checker.py", line 2311, in check_compatibility_super
  File "mypy/checker.py", line 4494, in check_subtype
  File "mypy/checker.py", line 4767, in fail
  File "mypy/messages.py", line 180, in fail
  File "mypy/messages.py", line 165, in report
  File "mypy/errors.py", line 319, in report
  File "mypy/errors.py", line 350, in add_error_info
  File "mypy/errors.py", line 322, in _add_error_info
AssertionError: 
src/xxsflow/utils/__init__.py:54: : note: use --pdb to drop into pdb

Any help and follow-up questions are appreciated!

@hauntsaninja
Copy link
Collaborator

Closing, since there isn't a repro. Please re-open if you have something shareable. Fwiw, we fixed things that could cause this in #4881 / #7510

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash topic-configuration Configuration files and flags
Projects
None yet
Development

No branches or pull requests

3 participants