microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.71k stars 767 forks source link

Pylance report Missing Imports #1445

Closed richardHaggioGwati closed 3 years ago

richardHaggioGwati commented 3 years ago

Environment data

Expected behaviour

from freegames import square, vector

Actual behaviour

Import "freegames" could not be resolved Pylance report Missing Imports

Logs

I am unable to enable trace logging

Code Snippet / Additional information

XXX
bschnurr commented 3 years ago

Try using the "Pylance: Report Issue" command. it automatically copies the logs to your clipboard so that you can pase them. but you still need to turn tracing on in your settings.json ctrl+,

richardHaggioGwati commented 3 years ago

I'd you could walk me through the process, I would appreciate that

jakebailey commented 3 years ago

You would want to set:

image

Then find the logs in the output window here:

image

richardHaggioGwati commented 3 years ago

I have managed to select Trace, although I am unable to find the language server

[Uploading v8{230a58c} (3408bcc8-c8a8-4f57-b878-7f8dbad544b4 id=0x7f0a03c0) …]()

jakebailey commented 3 years ago

For reference, you can find a link to the output here:

image

Then, you will see the dropdown on the right of the panel that appears.

richardHaggioGwati commented 3 years ago

Hello Sir As instructed, I have open the output window and I am in the Python Language Server.20210619_090628.jpg

jakebailey commented 3 years ago

Screenshots aren't really going to give us the info we need; can you copy and paste that entire output?

richardHaggioGwati commented 3 years ago

Good morning and or Evening Sir, attached you will find a pdf with the output log that you requested. Hopefully it helps resolve the issue with the extension.

Info.pdf

jakebailey commented 3 years ago

Thanks.

Where do you have freegames installed? Your logs indicate that your selected interpreter is:

C:\Users\Mr Cephas\AppData\Local\Programs\Python\Python38\python.exe

Did you install freegames globally to this interpreter, or to some other interpreter?

richardHaggioGwati commented 3 years ago

Morning/Evening and or Afternoon

I have not installed freegames anywhere, I am trying to import it and this is the first time I have tried to import a module and I am unable to import it. Should i install freegames on my computer?

acbetter commented 3 years ago

I use this to solve the issue. Mod your settings.json . Hope it works.

{
    "python.languageServer": "Pylance",
    "python.defaultInterpreterPath": "python3"
}
richardHaggioGwati commented 3 years ago

Thanks let me try it

On Tue, 29 Jun 2021, 07:42 acbetter, @.***> wrote:

I use this to solve the issue. Mod your settings.json . Hope it works.

{ "python.languageServer": "Pylance", "python.defaultInterpreterPath": "python3" }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/pylance-release/issues/1445#issuecomment-870254038, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASLSBVMOSYYITAECACX3Z4DTVFMOFANCNFSM46UUJBNQ .

richardHaggioGwati commented 3 years ago

It is all okay now. Thanks guys.