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
Anonymous
Not applicable

Error with embeding a report into jupyter notebook

Hello everyone!

My code in jupyter notebook looks like this:

from powerbiclient import Report, models
from powerbiclient.authentication import DeviceCodeLoginAuthentication

 

auth = DeviceCodeLoginAuthentication()

 

workspace_id = '111111111'
report_id = '2222222'


# Create an instance of the Power BI Report
power_bi_report = Report(group_id=workspace_id, report_id=report_id, auth=auth)

 

power_bi_report

 

 

But the report doesn't embed. And O got an error:
[Open Browser Console for more detailed log - Double click to close this message] Failed to load model class 'ReportModel' from module 'powerbi-jupyter-client' Error: Script error for "powerbi-jupyter-client" http://requirejs.org/docs/errors.html#scripterror at makeError (https://tmp-ai-engine.notebook.eu-central-1.sagemaker.aws/static/nbclassic/components/requirejs/requ...) at HTMLScriptElement.onScriptError (https://tmp-ai-engine.notebook.eu-central-1.sagemaker.aws/static/nbclassic/components/requirejs/requ...)

 

Mamuka96_0-1706883442201.png

Mamuka96_1-1706883458754.png

 

 
Please help me with it

 

4 REPLIES 4
Diegomon
Frequent Visitor

I am getting the same error, any solution?

lbendlin
Super User
Super User

Does it work with VSC notebooks?

 

Anyway,  did you follow all the instructions here?  Create Power BI reports in Jupyter Notebooks | Microsoft Power BI Blog | Microsoft Power BI

Anonymous
Not applicable

Hello @lbendlin Yes I followed the instructions from https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/powerbi-jupyter

-pip install powerbiclient

from powerbiclient.authentication import DeviceCodeLoginAuthentication # Initiate device authentication device_auth = DeviceCodeLoginAuthentication()

-group_id="Workspace ID"

 report_id="Report ID"

-report = Report(group_id=group_id, report_id=report_id, auth=device_auth)

 report

 

 

And got an error which I mentioned

I tried on VS Code and am getting a different error

 

Error rendering output item using 'jupyter-ipywidget-renderer'

  • Cannot read properties of undefined (reading 'ipywidgetsKernel')

I know this worked at some point. Will need to investigate where the permissions break down.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI 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.