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.
Can we get one of the fabric devs to chime in on this?
The reality is that many libraries out there have intellisense working just fine. So it isn't a limitation of the tool. Those libraries are all also installed via packages. pandas is an example. bs4 is another example.
The question is very simple: what is the Fabric UI code trying to do when it loads intellisense/docstrings? You can clearly see it doing a little "loading..." thing for a split second - so where is it trying to get that info from?
Hi HoneHealthMB,
Thank you for your follow-up and for pointing out that libraries like pandas and bs4 render IntelliSense well, which shows this isn’t a limitation of Fabric’s tools. Your observation of the “Loading…” message in the UI is a great clue it suggests Pylance is trying to fetch docstring data but not succeeding for your custom wheel package.
The “Loading…” likely indicates Pylance is querying your package’s metadata or files in the Spark environment’s library path, possibly missing type information (e.g: type stubs or a py.typed file) that pandas and bs4 include. Here are some next steps to try:
- Check if pandas or bs4 include type-related files your package might need to enable rich IntelliSense.
- Ensure your custom Spark environment is configured correctly, as outlined in the Using Python Experience on Notebook page. Restarting the session might help Pylance.
- Temporarily using source files in the notebook’s resources folder could confirm if Pylance reads docstrings differently from your wheel package.
If this response helps, consider marking it as “Accept as solution” and giving a “kudos” to assist other community members.
Thank you.
- HoneHealthMB1 year agoAdvocate I
I'm fairly new to python - is there a relatively straightforward way to determine precisely what is in the bs4 package?
- v-ssriganesh1 year agoCommunity Support
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.