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

No auto complete options show for Openpyxl #947

Closed
luabud opened this issue Jun 18, 2020 · 10 comments
Closed

No auto complete options show for Openpyxl #947

luabud opened this issue Jun 18, 2020 · 10 comments
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version needs stub

Comments

@luabud
Copy link
Member

luabud commented Jun 18, 2020

From MicrosoftDocs/intellicode#199 by @Blotuxs

Hi

About a month ago Intellicode showed me recommendations for the Openpyxl library in Python. And since a few days ago it does not show all the recommendations (As seen in the image it does not show the Cell recommendation or others).

Try reinstalling Visual Studio Code, Openpyxl, Python and Intellicode but it doesn't work.

Try to delete the Extensions folder and download it again.

Settings:
"python.jediEnabled": false
"python.languageServer": "Microsoft"

I would appreciate any recommendation. Thank, in advance.
Screenshot (3)

Update:

If I dont click on "Enable it and Reload Windows", appear all the suggestions

Captura de pantalla (9)

@MoonBrain1
Copy link

Hi,
Did you find a solution to this? I have the same problem.

@ghost
Copy link

ghost commented Feb 11, 2021

I had the same problem when I was getting sheet by name sheet = wb["Sheet1"]
but when I accessed the sheet by index like this sheet = wb.worksheets[0] all the suggestions were there

@luabud luabud transferred this issue from microsoft/vscode-python Feb 12, 2021
@jakebailey
Copy link
Member

I'm not sure this is related to Pylance, if the old "Microsoft" language server setting was being used. Try with pylance enabled, perhaps?

@jakebailey jakebailey added the waiting for user response Requires more information from user label Feb 12, 2021
@github-actions github-actions bot removed the triage label Feb 12, 2021
@luabud
Copy link
Member Author

luabud commented Feb 12, 2021

@MoonBrain1 and @84tom, we have recently released a new and more performant language server called Pylance which likely solves these issues you are reporting. You can download Pylance from the marketplace and install it alongside the core Python extension. Would you be able to try it out and let us know if it's working?

@jakebailey
Copy link
Member

It's been over a month since we asked for info and added the "waiting for info label"; I'm going to close this. If this is still a problem and you can provide more info, we can reopen this issue.

@ptrobot555
Copy link

Any update regarding this issue? I'm using Pylance 2021.5.1 but the issue is still there.

Not working with wb["Sheet1"]

image

But works with wb.worksheets[0]

image

@jakebailey jakebailey reopened this May 12, 2021
@jakebailey jakebailey added needs stub and removed waiting for user response Requires more information from user labels May 12, 2021
@jakebailey
Copy link
Member

Thanks. This appears to be a case where we can't infer the type of the result of the index expression; it's likely this library needs to be better stubbed (or have stubs written) to capture what that operator does.

@ptrobot555
Copy link

Thanks for the input, @jakebailey. I have installed the openpyxl-stubs and it seems to be working fine now (tested both in Windows 10 and Linux).

$ pip install openpyxl-stubs
https://github.com/MartinThoma/openpyxl-stubs

image

@jakebailey
Copy link
Member

Thanks for that link; we may be able to bundle those stubs like we do a few other stub packages.

@jakebailey jakebailey added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label May 18, 2021
@jakebailey
Copy link
Member

This issue has been fixed in version 2021.5.3, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202153-19-may-2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version needs stub
Projects
None yet
Development

No branches or pull requests

4 participants