Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
I have built a very simple Python package to use in my Fabric notebooks. The package is basically just a set of some utility/helper classes. I have searched extensively, and attempted countless different configurations to get intellisense to work within the Fabric notebooks - but everything I have tried has failed.
Goal: Get my custom package's classes and methods to show their docstrings as expected.
I have tried all various types of "official" commenting methods/syntaxes:
```
That didn't work - so I went and looked at Microsoft's own packages (azure-ai-projects for example) - and they follow a different format, so I tried that:
Then I realized that even the azure packages themselves do not render good intellisense inside Fabric notebooks.
I've tried all the normal tricks for how wheel packages are built - no dice.
To be clear, I *am* able to see the definition of the method and the names of the parameters - but I do not see any of the detailed description of the method or the parameters or the classes (i.e. the stuff that is actually helpful to people).
I did make one interesting discovery - and that is the bs4 package (BeautifulSoup) actually renders the rich intellisense content amazingly well.
Has anyone managed to do this successfully?
Solved! Go to Solution.
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-ticket
If this helps, please "Accept as solution" and drop a "Kudos" so other members can find it more easily.
Thank you.
Hi @HoneHealthMB,
Thank you for reaching out to the Microsoft fabric community forum.
After thoroughly reviewing the details you provided, it seems the core issue is that Pylance (the IntelliSense engine in Fabric notebooks) isn’t rendering the detailed docstrings for your custom package when installed as a wheel, either via a custom Spark environment or notebook resources. The fact that IntelliSense works when the code is directly in the notebook, and that bs4 displays rich IntelliSense, suggests this may be related to how Pylance processes packaged libraries in Fabric’s Spark environment.
Here are a few suggestions to try:
For additional guidance on managing Python packages in Fabric notebooks, you may find this official documentation helpful: Using Python Experience on Notebook. It covers package installation and environment setup, which might provide further context.
The fact that even Microsoft’s azure-ai-projects package doesn’t render rich IntelliSense suggests this could be a limitation in Fabric’s Pylance integration, possibly due to its preview status.
If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
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:
If this response helps, consider marking it as “Accept as solution” and giving a “kudos” to assist other community members.
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:
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.
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.
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.
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?
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-ticket
If this helps, please "Accept as solution" and drop a "Kudos" so other members can find it more easily.
Thank you.
Hi @HoneHealthMB,
Could you please confirm if the issue has been resolved after raising a support case? If a solution has been found, it would be greatly appreciated if you could share your insights with the community. This would be helpful for other members who may encounter similar issues.
Thank you for your understanding and assistance.
I have tried using stub files and they make no difference. I have tried every format of docstrings. I compared every potential difference between the bs4 wheel package and mine. There are no differences.
At this point, I am hoping that someone at Microsoft who works on the Fabric UI can speak to this.
Sorry, hit reply too soon...
I have dug deeply into the bs4 code and azure-ai-projects code and I cannot find any differences in how the docstrings are formatted. Since its a wheel package, I do not know any way to force it to include additional help files. I did apply the "zip_safe=False" flag as I thought that might be the issue.
I have discovered that the Fabric notebook UI is at least attempting to load the help/docstring content - because when you hover over a class name or method name, you will see a "Loading.." message appear very briefly right under the popover method name. The trick now is to try and figure out where it is attempting to load it from.
Thank you for the reply.
I am adding my wheel package to a custom Spark environment in Fabric to avoid our engineers from having to install it on every notebook, etc. If I do this in my notebook:
print(myclass.__doc__)
I see the documentation content just fine.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
13 | |
4 | |
3 | |
3 | |
3 |
User | Count |
---|---|
8 | |
7 | |
6 | |
6 | |
5 |