-1

Hey guys I have a problem in vscode I get no auto-completion (i am on windows) and this is a fresh install from vscode:
screenshot showing "No suggestions"

but it should auto-complete to boat_parts

Here are my only 2 extensions:

This is my interpreter:

This is my settings.json in my project:

I tried to add in my settings.json this: "python.pythonPath": "C:\\Users\\josch\\AppData\\Local\\Programs\\Python\\Python311\\python.exe" it did not work

Also when I opened my settings.json from the settings GUI it was empty which I find a bit weird

I runned the "where python" command and got this: C:\Users\josch\AppData\Local\Microsoft\WindowsApps\python.exe I also tried to put it as python path and it did not work

BTW: i need to have 10 rep to post images so I just posted the links yea it's horrible :(

also I have the same bug in vscodium (the open source version of vscode)

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13
joschma
  • 1
  • 1
  • Did you import the package that has your boat class? Also you have (of course?) tried restarting vscode? – topsail Aug 29 '23 at 17:33
  • Yes I imported it and yea every time I changed some thing in the settings I restarted vscode – joschma Aug 29 '23 at 17:36
  • When you define the object, did you define it explicitely as type Boat ? – rochard4u Aug 29 '23 at 17:40
  • 1
    Please read [Why should I not upload images of code/data/errors?](https://meta.stackoverflow.com/q/285551/354577) – ChrisGPT was on strike Aug 29 '23 at 17:56
  • I am unable to reproduce your situation. I would recommend removing/resetting pylance settings to defaults (since you don't have very many settings anyway). Then post a Minimal Reproducible Example - no one will want to try to recreate your classes and code by typing things out from images (although in general the unknowns here are the structure of your project, your imports, and how you are using your workspace, not specificly a Boat - that is, may as well be a Car or a Foo - basically, if you have a class and you are doing things properly you should see autocomplete on the properties). – topsail Aug 29 '23 at 19:15
  • I prefer that this is an issue with your code writing. Please provide a code that can reproduce the problem. You can also try to add `"python.languageServer": "Pylance",` to your settings.json then reload VSCode. – MingJie-MSFT Aug 30 '23 at 01:52

0 Answers0