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

VS Code not able to detect python files #146528

Closed
amalthomas-exe opened this issue Apr 1, 2022 · 12 comments
Closed

VS Code not able to detect python files #146528

amalthomas-exe opened this issue Apr 1, 2022 · 12 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@amalthomas-exe
Copy link

Issue Type: Bug

Whenever I create a python file, it automatically goes to the binary mode. I manually have to select the language mode.

Pls fix this ASAP !!

VS Code version: Code 1.65.2 (c722ca6, 2022-03-10T15:36:26.048Z)
OS version: Linux x64 5.13.0-37-generic
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Celeron(R) N4000 CPU @ 1.10GHz (2 x 2553)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: disabled_off
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 7.59GB (1.48GB free)
Process Argv --unity-launch --crash-reporter-id d2e5fbb0-7926-4fb6-88bb-794f4dffa3f5
Screen Reader no
VM 0%
DESKTOP_SESSION plasma
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP KDE
XDG_SESSION_TYPE x11
Extensions (20)
Extension Author (truncated) Version
html-snippets abu 0.2.1
vscode-css-formatter aes 1.0.2
doxdocgen csc 1.4.0
dart-code Dar 3.36.0
flutter Dar 3.36.0
es7-react-js-snippets dsz 4.4.3
copilot Git 1.11.5453
better-cpp-syntax jef 1.15.13
firebase-explorer jsa 0.3.3
python ms- 2022.4.0
vscode-pylance ms- 2022.3.4
remote-containers ms- 0.231.1
remote-ssh ms- 0.76.1
remote-wsl ms- 0.64.2
cmake-tools ms- 1.10.5
cpptools ms- 1.9.7
cpptools-extension-pack ms- 1.1.0
vetur oct 0.35.0
LiveServer rit 5.7.5
cmake twx 0.0.17

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vsclayoutctrc:30451274
pythonvsnew555:30457759
vscscmwlcmt:30438805
vscgsvid2:30447481
vscaat:30438848
pynewfile477:30463512

@gjsjohnmurray
Copy link
Contributor

/gifPlease

@amalthomas-exe
Copy link
Author

Recording 2022-04-03 at 13 08 16

As you can see here, after creating a python file, I manually have to select the language mode before working on it.

Please resolve this ASAP as this is seriously affecting my workflow.

PS: This issue is there for python only ig.

@gjsjohnmurray
Copy link
Contributor

What version of Python have you installed on your Windows workstation?

@amalthomas-exe
Copy link
Author

Its Python 3.8 and it's a Linux machine

@amalthomas-exe
Copy link
Author

Any update on this issue 🤔🤔

@TylerLeonhardt
Copy link
Member

I’m suspicious of an extension causing this behavior. Can you open the Command Palette (/Ctrl+Shift+P) and run the extension bisect command: Help: Start Extension Bisect and follow the prompts? (More information about Extension Bisect here)

@TylerLeonhardt
Copy link
Member

I'm also suspicious of the files.associations user setting. Can you double check that and make sure nothing is overwriting Python to Binary?

@amalthomas-exe
Copy link
Author

Hey @TylerLeonhardt .

Seems like you were right. The issue is with the files.associations user settings.

image

What is the correct alternative to this ??

@TylerLeonhardt
Copy link
Member

@amalthomas-exe What is it that you are trying to achieve with that setting? Why is it set to code-text-binary instead of leaving the default (remove that line) which is to detect .py files as Python?

@amalthomas-exe
Copy link
Author

I didn't do that. Maybe some faulty extension setting ig.

Anyways thanks for your help.

@amalthomas-exe
Copy link
Author

The issue has been resolved. Closing it.

@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants
@TylerLeonhardt @gjsjohnmurray @tanhakabir @amalthomas-exe and others