Error occurring in Python Activity

Hi guys! The script as below runs well within Pycharm.

It encounters error within UiPath. There is no useful info.

I adjust the code so that it can run within UiPath.

It seems that PyADOmd package is related to .NET which causes the error, I guess.
And my intention is to retrieve data from Powerbi desktop using python script.
Thanks in advanced!

@donfeng91

The issue is your .net library as suspected

Currently UiPath uses .net 5+ and messaging.callcontext is not available..

You might need to change the library for it to work as it uses .net 4.8

ideally it might not work ,unless you use a lower version python package(UiPath) and python version then as lower version of python version needs lower .net runtime it might work

Cheers

Thanks for your sharing.
I’ve tried to lower relatives. Failed.
At last, use PowerBI python visual object to invoke PyADOmd and PowerShell.

1 Like