Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
# Import the translation library
from textblob import TextBlob
# Create a function for translation
def translation(text):
blob = TextBlob(text)
return str(blob.translate(from_lang='ar', to='en'))
# Apply the translation function to the relevant column in the dataset
dataset['translation'] = dataset['Comment'].apply(translation)
i couldnt resolve the below issue:
DataSource.Error: ADO.NET: Python script error.
<pi>Traceback (most recent call last):
File "C:\Users\romany.fahmy\PythonScriptWrapper_f98538af-0b94-4b4f-8564-167f0283ffcc\PythonScriptWrapper.PY", line 2, in <module>
import os, pandas, matplotlib
ModuleNotFoundError: No module named 'matplotlib'
</pi>
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=Python script error.
<pi>Traceback (most recent call last):
File "C:\Users\romany.fahmy\PythonScriptWrapper_f98538af-0b94-4b4f-8564-167f0283ffcc\PythonScriptWrapper.PY", line 2, in <module>
import os, pandas, matplotlib
ModuleNotFoundError: No module named 'matplotlib'
</pi>
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException
Hi @Romani ,
Does the information provided by some_bih help you solve your problem? If it helps, please accept the responses you find helpful as solution.
Best Regards,
Dino Tao
# 'dataset' holds the input data for this script
# Import the translation library
from textblob import matplotlib.pyplot as plt
# Create a function for translation
def translation(text):
blob = TextBlob(text)
return str(blob.translate(from_lang='ar', to='en'))
# Apply the translation function to the relevant column in the dataset
dataset['translation'] = dataset['Comment'].apply(translation)
after your update the below issue appeared:
DataSource.Error: ADO.NET: Python script error.
<pi> File "C:\Users\romany.fahmy\PythonScriptWrapper_1a152b9c-825d-4fbb-b52c-05213fa30147\PythonScriptWrapper.PY", line 18
from textblob import matplotlib.pyplot as plt
^
SyntaxError: invalid syntax
</pi>
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=Python script error.
<pi> File "C:\Users\romany.fahmy\PythonScriptWrapper_1a152b9c-825d-4fbb-b52c-05213fa30147\PythonScriptWrapper.PY", line 18
from textblob import matplotlib.pyplot as plt
^
SyntaxError: invalid syntax
</pi>
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException
Hi @Romani check community experience for your error
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
62 | |
61 | |
49 | |
45 |