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

"Configuration Changed" error #42

Closed
johnlarusic opened this issue Nov 8, 2021 · 1 comment
Closed

"Configuration Changed" error #42

johnlarusic opened this issue Nov 8, 2021 · 1 comment

Comments

@johnlarusic
Copy link

johnlarusic commented Nov 8, 2021

Hello! I've created a project using Django Cookiecutter, following the steps listed here:
https://cookiecutter-django.readthedocs.io/en/latest/developing-locally.html

(from a project generation perspective, I'm using about as vanilla setup as possible -- "no" to pretty well all questions except "y" for Windows and "y" for Whitenoise; no cloud provider, using GitHub as CI tool).

When I open the project up in VSCode and setup a path to dmypy.exe correctly (as found in my virtual environment folder) I get the following error raised by VSCode in the output panel:

Mypy extension activated, version 0.2.1
Registering listener for interpreter changed event
Listener registered
...
Mypy settings changed: c:\Users\MYUSERNAME\Development\Navigator\nav
[3] Check workspace: c:\Users\MYUSERNAME\Development\Navigator\nav
[3] Received python path from Python extension: c:\Users\MYUSERNAME\Development\Navigator\.venv\Scripts\python.exe
[3] Running dmypy in folder c:\Users\MYUSERNAME\Development\Navigator\nav
'c:\Users\MYUSERNAME\Development\Navigator\nav\..\.venv\scripts\dmypy.exe' --status-file 'c:\Users\MYUSERNAME\AppData\Roaming\Code\User\workspaceStorage\0e535676e284b08a0f096efc595261d2\matangover.mypy\dmypy-25dcc9f6aa1070ea6d08209fdd5961c72b27b416.json' run --log-file 'c:\Users\MYUSERNAME\AppData\Roaming\Code\User\workspaceStorage\0e535676e284b08a0f096efc595261d2\matangover.mypy\dmypy-25dcc9f6aa1070ea6d08209fdd5961c72b27b416.log' -- . --show-column-numbers --no-error-summary --no-pretty --no-color-output --python-executable 'c:\Users\MYUSERNAME\Development\Navigator\.venv\Scripts\python.exe'
[3] stdout:
Daemon started
Restarting: configuration changed
Daemon stopped
Daemon started

[3] stderr:
Response: {'restart': 'configuration changed', 'platform': 'win32', 'python_version': '3_9', 'roundtrip_time': 0.5840277671813965}

[3] Error running mypy in c:\Users\MYUSERNAME\Development\Navigator\nav: mypy failed with error: "Response: {'restart': 'configuration changed', 'platform': 'win32', 'python_version': '3_9', 'roundtrip_time': 0.5840277671813965}

Here is my .vscode/settings.json file:

{
  "python.linting.mypyEnabled": true,
  "python.linting.enabled": true,
  "mypy.dmypyExecutable": "${workspaceFolder}\\..\\.venv\\scripts\\dmypy.exe"
}

I'm not quite sure how to further debug this issue ("configuration changed" isn't turning up relevant google results). What I know is that this extension works for other projects that I've manually added mypy to.

I'm not sure who exactly I should be raising my issue to -- this VSCode extension, mypy, or the Django Cookiecutter folks, but thought I'd start here. Any advice or direction would be appreciated! Thanks in advance.

Update: Still getting the error, but can confirm that mypy works fine when called via command line:

(.venv) PS C:\Users\MYUSERNAME\Development\Navigator\nav> mypy .
config\urls.py:19: error: Unsupported operand types for + ("List[object]" and "List[URLPattern]")
config\urls.py:46: error: Incompatible types in assignment (expression has type "List[URLResolver]", variable has type "List[object]")
config\urls.py:46: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
config\urls.py:46: note: Consider using "Sequence" instead, which is covariant
config\urls.py:46: error: Unsupported operand types for + ("List[URLResolver]" and "List[object]")
Found 3 errors in 1 file (checked 39 source files)
@johnlarusic
Copy link
Author

OK, looks like this is a mypy issue: python/mypy#10709

For everyone's reference, the (temporary?) fix is add ignore_missing_imports_per_module = True to the mypy config as noted in the issue thread.

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

No branches or pull requests

1 participant