Forum Discussion
Intellisense for custom Python packages not working in Fabric notebooks
- 1 year ago
Hi HoneHealthMB,
We apologize for the inconvenience caused. Please consider raising a Microsoft support ticket for further investigation. You can explain all the troubleshooting steps you have taken to help them better understand the issue.
You can create a Microsoft support ticket with the help of the link below:
https://learn.microsoft.com/en-us/power-bi/support/create-support-ticketIf this helps, please "Accept as solution" and drop a "Kudos" so other members can find it more easily.
Thank you.
I'm fairly new to python - is there a relatively straightforward way to determine precisely what is in the bs4 package?
Hello HoneHealthMB,
Even if you're newer to Python, there are a few straightforward ways to explore what’s included in the bs4 package, even if you’re new to Python.
One easy approach is to locate where the package is installed in your environment and then browse its contents. You can do this either from within the notebook using basic Python tools (like checking the file path of an imported package) or by exploring the installed packages folder directly via the notebook file browser or environment settings.
You're specifically looking for:
- A py.typed file — which marks the package as having type information
- Any .pyi stub files — these provide explicit type definitions that tools like IntelliSense can use
- Well-documented source files with structured docstrings and type hints
Another helpful option is to review the package on GitHub or PyPI. For example, bs4 is available on GitHub, where you can see how its files and docstrings are organized.
If this reply helps, please consider marking it as "Accept as solution" and giving it a kudos to support others in the community.
- HoneHealthMB1 year agoAdvocate I
Thanks. I have actually done all of those things exhaustively. I have a py.typed file in my package, all stub filres are in place. Docstrings are in place and type hints are there.
The intellisense *will* show the type hints - the issue is that it doesn't load any of the commentary around how the methods work, or what they do, etc, etc.
I have even downloaded the bs4 wheel package, given it to chat GPT, adn then given it my wheel package. I'm literally doing everything exactly the same way. The only exception is that I was including .stub files and they do not - so I am going to try and remove them.
- v-ssriganesh1 year agoCommunity Support
Hi HoneHealthMB,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- HoneHealthMB1 year agoAdvocate I
I have an update that I hope helps.
I decided to simplify this as much as possible and found that the error is almost definitely a bug in the Fabric notebook UI.
After extensive comparisons between my library and others - it is clear that there is no ryhme or reason as to what makes it work or not. I created a blank notebook in a default environment, with no customizations.
I did a pip install of my module. No docstrings are rendered, and half of the time it isn't even correctly identifying what is a "class" and what is an "Any" type - even at the module level. It has this same problem with the azure libraries.
I then went to the Google Colab notebook tools, and repeated the same process. All docstrings are rendered perfectly, without issue, without any extra steps. That is even true of the azure libraries themselves.
I think at this point, if Google Colab is better at recognizing Microsoft's intellisense than its own editor - we can say with a fair amount of certainty that there is a legitimate bug somewhere. My guess is that it is in how it is caching and what not - but even if I eradicate my local cache - it makes no difference.
Both Google Colab and the Fabric notebooks use the monaco code editor FYI.
Do we have enough info at this point to escalate to someone at MS?