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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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