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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

why it breaks at line 28?

tanthiamhuat88_0-1739799456420.png

with line 28 uncommented, it throws error below:

PythonException: An exception was thrown from the Python worker. Please see the stack trace below. Traceback (most recent call last): File "/opt/spark/python/lib/pyspark.zip/pyspark/worker.py", line 1232, in main func, profiler, deserializer, serializer = read_udfs(pickleSer, infile, eval_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/worker.py", line 1068, in read_udfs udfs.append(read_single_udf(pickleSer, infile, eval_type, runner_conf, udf_index=i)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/worker.py", line 530, in read_single_udf f, return_type = read_command(pickleSer, infile) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/worker.py", line 91, in read_command command = serializer._read_with_length(file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 174, in _read_with_length return self.loads(obj) ^^^^^^^^^^^^^^^ File "/opt/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 472, in loads return cloudpickle.loads(obj, encoding=encoding) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'azure.ai'

 

 

1 ACCEPTED SOLUTION
nilendraFabric
Super User
Super User

Hello @Anonymous 

The error "ModuleNotFoundError: No module named 'azure.ai'" occurs in a Fabric notebook when the required Azure AI Python package is not installed in the current environment. 


Install this package either as part of session or in Environment.
%pip install azure-ai-textanalytics

 


After installation, verify that the package is installed correctly:


%pip show azure-ai-textanalytics

If this is helpful , please accept the answer

 

 

View solution in original post

4 REPLIES 4
v-csrikanth
Community Support
Community Support

Hi @Anonymous 
It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!

v-csrikanth
Community Support
Community Support

Hi @Anonymous 
We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please Accept as Solution to help others benefit in the community.
Thank you,
Cheri Srikanth.

v-csrikanth
Community Support
Community Support

Hi @Anonymous 
As highlighted by @nilendraFabric , the proposed approach appears to effectively address your requirements.
Could you please confirm if your issue has been resolved?
If you are still facing any challenges, kindly provide further details, and we will be happy to assist you.

Thanks 
Cheri Srikanth

nilendraFabric
Super User
Super User

Hello @Anonymous 

The error "ModuleNotFoundError: No module named 'azure.ai'" occurs in a Fabric notebook when the required Azure AI Python package is not installed in the current environment. 


Install this package either as part of session or in Environment.
%pip install azure-ai-textanalytics

 


After installation, verify that the package is installed correctly:


%pip show azure-ai-textanalytics

If this is helpful , please accept the answer

 

 

Helpful resources

Announcements
December Fabric Update Carousel

Fabric Monthly Update - December 2025

Check out the December 2025 Fabric Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.