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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.