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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
aki_h
Frequent Visitor

OSError: Cache file does not exists. in Notebook

Hello.

 

In Microsoft Fabric's Notebook, the following error occurred when running pyspark.
It was running fine a few minutes before the error occurred.

 

My colleague is in the same situation, and there is no configuration change or other event that I am aware of.

 

I would appreciate any information if anyone else has a similar phenomenon or knows of a solution or fault information.

Thanks for taking a look at the post.

 

import sempy.fabric as fabric
from pyspark.sql import functions as F
from pyspark.sql.types import StructType, StructField, StringType, IntegerType, DateType, DecimalType

## ---error message
Cache file does not exists. resource=$ml, path=$/nfs4/tridenttokenlibrary/tokens/ml.token
failed to get ml token
Traceback (most recent call last):
  File "/home/trusted-service-user/cluster-env/trident_env/lib/python3.11/site-packages/synapse/ml/fabric/token_utils.py", line 156, in _get_access_token_from_token_lib
    return PyTridentTokenLibrary.get_access_token_from_cache(resource)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/trusted-service-user/cluster-env/trident_env/lib/python3.11/site-packages/trident_token_library_wrapper.py", line 71, in get_access_token_from_cache
    raise IOError(err_msg)
OSError: Cache file does not exists. resource=$ml, path=$/nfs4/tridenttokenlibrary/tokens/ml.token

 

1 ACCEPTED SOLUTION
aki_h
Frequent Visitor

By logging out once and restarting the browser, it works fine again.

 

I don't know why this is the case, but I hope this information will be helpful to others who have had the same problem.

View solution in original post

3 REPLIES 3
P_work
Helper I
Helper I

No need for restart for myself. Second run of notebook cell executed error-free and with no code changes.

TomT131
Frequent Visitor

Hi,

Same error here since yesterday. Notebook used to run fine prior.
Couldnt find anything that references.

$/nfs4/tridenttokenlibrary/tokens/ml.token

After a restart, it seems to be resolved.

 

Is this a transient issue?
Cheers,

aki_h
Frequent Visitor

By logging out once and restarting the browser, it works fine again.

 

I don't know why this is the case, but I hope this information will be helpful to others who have had the same problem.

Helpful resources

Announcements
FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Fabric Update Carousel

Fabric Monthly Update - March 2026

Check out the March 2026 Fabric update to learn about new features.

Top Kudoed Authors