Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ChhayaSharma
Regular Visitor

Microsoft Fabric

When we tried to run notebook below error comes but it is running in another workspace.Don't understand why this is happening. I am using trial version of microsoft fabric. 

 

"ename":"Exception","evalue":"Failed to create Livy session for executing notebook.

Error: [BadRequest] Invalid LakehouseWorkspaceId: ''. LakehouseWorkspaceId must be a GUID. HTTP status code: 400."

 

 

9 REPLIES 9
chitswe
New Member

In my case, I can run notebook from notebook editor. But when I add it to a pipline as notebook activity, it failed with that error. There are many notebook activities in my pipline. But only newly added notebook activities during this week encounter this problem. Old notebook activities run successfully.

Screenshot 2023-09-26 at 11.03.24 AM.png

 

This error seems to occur because the link between the notebook and the mounted storage or associated lakehouse is broken. To remove add re-add the lakehouse solved it for me. 

 

The section "Connect lakehouse and notebooks" from the Microsft Documentation provides more details:

https://learn.microsoft.com/en-us/fabric/data-engineering/how-to-use-notebook#connect-lakehouses-and...

NeoDunn_0-1695714283428.png

 

ChhayaSharma
Regular Visitor

I still face the same issue while running an executing notebook in a pipeline.

ChhayaSharma
Regular Visitor

I have free account of Azure portal with $200 free credits and using Fabric trial version but still facing same issue

Anonymous
Not applicable

Hi @ChhayaSharma ,
We haven’t heard from you on the last response and was just checking back to see if your query has been resolved. Please let us know if you have any further queries.

Anonymous
Not applicable

Hi @ChhayaSharma ,
Following up to see if the below suggestion was helpful. And, if you have any further query do let us know.

Anonymous
Not applicable

Hi @ChhayaSharma

In your case, the LakehouseWorkspaceId parameter is empty, which is not a valid GUID. To fix this error, you need to specify a valid LakehouseWorkspaceId when creating the Livy session. You can get the LakehouseWorkspaceId from the Azure portal.

Here are the steps on how to fix the error:

  1. Go to the Azure portal and sign in to your account.
  2. Click on the "Fabric" blade.
  3. Click on the "Workspaces" tab.
  4. Select the workspace that you want to use.
  5. Click on the "Settings" tab.
  6. Under the "Lakehouse" section, copy the "LakehouseWorkspaceId" value.

    Now that you have the LakehouseWorkspaceId, you can create the Livy session by specifying the LakehouseWorkspaceId parameter. For example:

    import livy
    
    client = livy.Client("https://fabric.azure.com")
    
    session = client.create_session(lakehouse_workspace_id="<LakehouseWorkspaceId>")

    Once the Livy session is created, you can run your notebook.

    I hope this helps! Let me know if you have any other questions.

Anonymous
Not applicable

I was having the same issue and what fixed for me was I changed the "Default storage format" to "Large semantic model storage format". It was Small semantic model storage format before the change. To do so, you go Workspace Settings > Premium, and scroll down until you see a section called "Default storage format"

Hi @Anonymous ,

 

Where should I add this code to?

Helpful resources

Announcements
December Fabric Update Carousel

Fabric Monthly Update - December 2025

Check out the December 2025 Fabric Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.