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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
cvandendriesche
New Member

Python Script Connection Error SOAP API " An existing connection was forcibly closed by the remote h

Dear all,


I'm using a python script in Power Bi to connect to another system via SOAP API.
It was working fine for some time, then the refresh started to work only 50% of the time (even manual refresh), no it's not working at all for some of my scripts. The same script is still working while running it outside of power bi in a jupyter notebook, only not working in power bi anymore. 


I got this error:

"DataSource.Error: ADO.NET: Python script error.
<pi>ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
</pi>
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=Python script error.
<pi>ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

During handling of the above exception, another exception occurred:

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
</pi>
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException"



Can someone help me with this problem?

Thank you!

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @cvandendriesche ,

 

There are many reasons result in this issue,such as the host or remote network interface is disabled, the remote host uses a hard close,the peer application on the remote host is suddenly stopped.Sometimes trying this from inside a firewalled Corporate network is also caused this error. Please rule out these possibilities first.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.