Forum Discussion

hamadani's avatar
hamadani
Frequent Visitor
4 years ago
Solved

Power BI DLL Load Error

Hello,

 

I am trying to run the following Python script in Power Query Editor (Power Query Editor → Transform → Run python script):

 

from pycaret.nlp import *
dataset = get_topics(dataset, text='en')

 

 

However, I get the following error message:

 

DataSource.Error: ADO.NET: Python script error.
<pi>C:\ProgramData\Anaconda3\envs\survey\lib\site-packages\past\builtins\misc.py:45: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  from imp import reload
ImportError: DLL load failed while importing error: The specified module could not be found.
</pi>
Details:
    DataSourceKind=Python
    DataSourcePath=Python
    Message=Python script error.
<pi>C:\ProgramData\Anaconda3\envs\survey\lib\site-packages\past\builtins\misc.py:45: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  from imp import reload
ImportError: DLL load failed while importing error: The specified module could not be found.
</pi>
    ErrorCode=-2147467259
    ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException

 

 

I can run the code with no problem in jupyter notebook using the same virtual environment set for Power BI in Options-> Python Scripting -> Python home directory

 

My python is 3.8 and Pycaret version is 2.3.5.

 

Thanks