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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ellgraa
Frequent Visitor

Apply Changes to query in Query Editor keeps disconnecting

Hello! I am a newbie to PowerBi and have been stuck on this issue for the past day. 

I have successfully uploaded 61 queries pulling data from a rest api into Power BI using individual python scripts. However, when I apply changes in power query editor, I always receive a disconnection error messages for one particular dataset despite my code working perfectly fine elsewhere (e.g. Pycharm). I have uploaded a picture of the error code below. 

This is the error code in text:
ADO.NET: Python script error. Connection Error, retrying in 0 seconds http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

I have updated my power BI desktop app. I have implemented rate limiting. I have refreshed each query individually before attempting to apply changes. My Python script works fine elsewhere. My API key is working as all my other python scripts are successful. My visualisation of this particular dataset is completely fine, however because I now want to load further queries, I need to fix this issue to do this. I understand that is one of my bigger datasets

Many Thanks 🙂

loading error photo.jpg


UPDATE:
I have also received a newer error message when refreshing this specific query:

ADO.NET: Python script error.
<pi>Connection Error, retrying in 0 seconds
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
</pi>
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=Python script error.
<pi>Connection Error, retrying in 0 seconds
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
</pi>
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException




1 ACCEPTED SOLUTION
ellgraa
Frequent Visitor

SOLVED!! I needed to add in a timeout interval in my code which bypassed PBI´s timeout limit. 

View solution in original post

1 REPLY 1
ellgraa
Frequent Visitor

SOLVED!! I needed to add in a timeout interval in my code which bypassed PBI´s timeout limit. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.