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

Sort Imports stopped working #13335

Closed
moi90 opened this issue Aug 7, 2020 · 4 comments
Closed

Sort Imports stopped working #13335

moi90 opened this issue Aug 7, 2020 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@moi90
Copy link

moi90 commented Aug 7, 2020

Environment data

  • VS Code version: 1.47.3
  • Extension version (available under the Extensions sidebar): 2020.7.96456
  • OS and version: Ubuntu 18.04.5 LTS
  • Python version (& distribution if applicable, e.g. Anaconda): Python 2.7.17 (System), Python 3.8.5 (Conda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Value of the python.languageServer setting: Jedi

Expected behaviour

When I click "Sort imports", the imports should be sorted.

Actual behaviour

Nothing happens. The Output Window reads:

> ~/.miniconda/envs/morphocut-graphviz/bin/python ~/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py ~/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/sortImports.py - --diff
cwd: ~/Work/19-MorphoCut/morphocut-graphviz/src/morphocut
> ~/.miniconda/envs/morphocut-graphviz/bin/python ~/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/pyvsc-run-isolated.py ~/.vscode/extensions/ms-python.python-2020.7.96456/pythonFiles/sortImports.py - --diff
cwd: ~/Work/19-MorphoCut/morphocut-graphviz/src/morphocut
@moi90 moi90 added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Aug 7, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Aug 10, 2020
@karrtikr
Copy link

Your issue maybe a dup of #12949. Can you please check if any errors are logged in Developer tools?

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

XXXX

@karrtikr karrtikr added the info-needed Issue requires more information from poster label Aug 10, 2020
@moi90
Copy link
Author

moi90 commented Aug 10, 2020

Yes, I get the same error:

mainThreadExtensionService.ts:65 [[object Object]]/home/moi/.miniconda/envs/morphocut-graphviz/lib/python3.8/site-packages/setuptools/distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
  warnings.warn(

$onExtensionRuntimeError @ mainThreadExtensionService.ts:65
_doInvokeHandler @ rpcProtocol.ts:402
_invokeHandler @ rpcProtocol.ts:387
_receiveRequest @ rpcProtocol.ts:303
_receiveOneMessage @ rpcProtocol.ts:230
(anonymous) @ rpcProtocol.ts:105
fire @ event.ts:587
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:587
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:203
addChunk @ _stream_readable.js:295
readableAddChunk @ _stream_readable.js:276
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
mainThreadExtensionService.ts:66 Error: /home/moi/.miniconda/envs/morphocut-graphviz/lib/python3.8/site-packages/setuptools/distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
  warnings.warn(

	at i (/home/moi/.vscode/extensions/ms-python.python-2020.7.96456/out/client/extension.js:1)
	at Socket.<anonymous> (/home/moi/.vscode/extensions/ms-python.python-2020.7.96456/out/client/extension.js:1)
	at Socket.emit (events.js:203)
	at Socket.EventEmitter.emit (/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/domain.js:476)
	at addChunk (_stream_readable.js:295)
	at readableAddChunk (_stream_readable.js:276)
	at Socket.Readable.push (_stream_readable.js:210)
	at Pipe.onStreamRead (internal/stream_base_commons.js:166)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:66
_doInvokeHandler @ rpcProtocol.ts:402
_invokeHandler @ rpcProtocol.ts:387
_receiveRequest @ rpcProtocol.ts:303
_receiveOneMessage @ rpcProtocol.ts:230
(anonymous) @ rpcProtocol.ts:105
fire @ event.ts:587
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:587
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:203
addChunk @ _stream_readable.js:295
readableAddChunk @ _stream_readable.js:276
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166

@karrtikr
Copy link

Great, please follow the workarounds mentioned there. This will likely be resolved in the next release.

@ghost ghost removed the triage label Aug 10, 2020
@rego-z
Copy link

rego-z commented Nov 7, 2020

  File "/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.10.332292344/pythonFiles/lib/python/isort/settings.py", line 31
    FILE_SKIP_COMMENTS: Tuple[str, ...] = (

getting this error

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants