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

[WinError 64] The specified network name is no longer available #410

Open
buzzysin opened this issue Apr 19, 2024 · 9 comments
Open

[WinError 64] The specified network name is no longer available #410

buzzysin opened this issue Apr 19, 2024 · 9 comments
Assignees
Labels
triage-needed Issue is not triaged.

Comments

@buzzysin
Copy link

buzzysin commented Apr 19, 2024

System info:
Windows 11 (Windows NT x64 10.0.22631)
VS Code version 1.88.1
ms-python.isort: 2023.10.1

This issue occurs with multiple formatters. I've tried ms-python.{autopep8, black, isort} and the same error occurs:

2024-04-19 17:49:15.245 [info] Getting interpreter from ms-python.python extension for workspace <OBFUSCATED>\code-windows\robotics-grp
2024-04-19 17:49:15.247 [info] Interpreter from ms-python.python extension for <OBFUSCATED>\code-windows\robotics-grp: <OBFUSCATED>\miniconda3\python.exe
2024-04-19 17:49:15.250 [info] Server run command: <OBFUSCATED>\miniconda3\python.exe <OBFUSCATED>\.vscode\extensions\ms-python.isort-2023.13.10681007\bundled\tool\lsp_server.py
2024-04-19 17:49:15.250 [info] Server: Start requested.
2024-04-19 17:49:17.276 [info] Error on reading from the event loop self pipe
loop: <ProactorEventLoop running=True closed=False debug=False>
Traceback (most recent call last):
  File "<OBFUSCATED>\miniconda3\Lib\asyncio\windows_events.py", line 461, in finish_socket_func
    return ov.getresult()
           ^^^^^^^^^^^^^^
OSError: [WinError 64] The specified network name is no longer available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<OBFUSCATED>\miniconda3\Lib\asyncio\proactor_events.py", line 793, in _loop_self_reading
    f.result()  # may raise
    ^^^^^^^^^^
  File "<OBFUSCATED>\miniconda3\Lib\asyncio\windows_events.py", line 798, in _poll
    value = callback(transferred, key, ov)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<OBFUSCATED>\miniconda3\Lib\asyncio\windows_events.py", line 465, in finish_socket_func
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer available

I expect this to be an environment or a network configuration issue on my end, but I haven't narrowed it down. Disabled my VPN, tried a different wireless channel, reset my wifi adaptor.

@github-actions github-actions bot added the triage-needed Issue is not triaged. label Apr 19, 2024
@karthiknadig
Copy link
Member

Are you using a File share? This is common if the file share machine is somehow blocked either by firewall or antimalware, or if the share name changed.

@buzzysin
Copy link
Author

buzzysin commented Apr 19, 2024

Hi @karthiknadig, I am afraid I am just using the Windows file system on my local machine, no layers in-between, no WSL, etc.

@karthiknadig
Copy link
Member

@buzzysin Did you update the value of any Environment variables? Did you change anything in hosts file?

@buzzysin
Copy link
Author

buzzysin commented Apr 19, 2024

@karthiknadig My hosts file is untouched and my environment is something like this

(Edit: removed environment variable spam to expiring pastebin link)

@karthiknadig
Copy link
Member

@buzzysin What is the version of miniconda that you have? also does it fail if you use windows store python?

@buzzysin
Copy link
Author

buzzysin commented Apr 20, 2024

@karthiknadig

I was using Miniconda 3 Python 3.12 version 24.1.2-0
I installed the Windows Store version of Python which fixed my issue (with ms-python.black-formatter).

isort now has some other issue where it is not being recognised as a formatter. I should probably open a different ticket for that.

@karthiknadig karthiknadig self-assigned this Apr 22, 2024
@karthiknadig
Copy link
Member

@buzzysin I sort is import organizer, you will see that when you use the Organize Import command. It does not register as a formatter. If you want to use it as a default import organizer on save, then you need to set it like this:

  "[python]": {
    "editor.codeActionsOnSave": {
        "source.organizeImports.isort": "explicit"
    },
  },

@buzzysin
Copy link
Author

Thanks for the help! For now I've switched to using the windows store version of python, which solved my problem.

@karthiknadig
Copy link
Member

@buzzysin I recommend having a look at Ruff Extension (https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff). It provides isort, black, and several linters like pylint, flake8 and several flake8 plugins in a single package. It is also implemented in rust and is significantly more performant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Issue is not triaged.
Projects
None yet
Development

No branches or pull requests

2 participants