cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Python function "go to definition" and "peek definition" do not work

eirik_morken
New Contributor III

When using notebooks with python in Databricks I would really like to easily see the defintion of the functions I am using within the editor. 
Which the "Go to definition (F12)" and "Peek definition" options when right clicking on the functions will help with.

However they do not seem to work for anyone on our tenant. 
It only displays "No definition found for 'test_function'" 
What could be the cause of this?


1 ACCEPTED SOLUTION

Accepted Solutions

eirik_morken
New Contributor III

This has now been resolved and is working as expected. Do not know why or how, but something has changed that made it work 🙂

View solution in original post

10 REPLIES 10

eirik_morken
New Contributor III

Screenshot that did not get included:

eirik_morken_0-1729766071920.png

 

Hi @eirik_morken ,

As per documentation this features only work when the notebook is attached to the cluster:

filipniziol_0-1729793894816.png

Make sure to attach to cluster:

filipniziol_1-1729793920974.png


And you can use the functionality:

filipniziol_2-1729793943001.png

If the notebook is not attached to the cluster, one gets the ""No definition found" message:

filipniziol_3-1729794097157.png

 




eirik_morken
New Contributor III

It is 100 % attached to the cluster, I just ran the test code 2 seconds before pressing the button 😁
That is what makes it strange.

Hi @eirik_morken ,

Could you tell us what's you cluster runtime? The “go to definition” feature is available in Databricks Runtime 12.2 LTS and above. 

15.4 LTS ML (includes Apache Spark 3.5.0, Scala 2.12)

eirik_morken
New Contributor III

Update: It seems to only affect my PC.

A colleague of mine tried to use the peek functionality on their own computer in the same tenant and the same cluster, and then it worked!
I logged into their computer in incognito tab and then it worked too.
My colleague then logged into my computer in an incognito tab and it did not work.

So we are a bit lost about what can cause this. We are supposed to have the same managed PC system from the company as well.

Any ideas? Or just accept that my PC has been cursed by the Databricks spirits?

eirik_morken
New Contributor III

Update: Not only my PC, but could be PC specific.
Found other colleagues which had the same issue, so not just my PC.

Hi @eirik_morken ,
It seems it is related more to your configurations or permissions rather than Databricks itself.
Have you tried checking different browsers? Maybe pop-ups are blocked by some setting or policy? 


eirik_morken
New Contributor III

I have tried in edge, firefox and chrome in incognito mode, all with popups enabled. 
Is this function even treated like a popup? Is it not internal web-app functionality?

eirik_morken
New Contributor III

This has now been resolved and is working as expected. Do not know why or how, but something has changed that made it work 🙂

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group