Help Center/
ModelArts/
Troubleshooting/
DevEnviron/
Code Running Failures/
An Error Occurs When You Run Code on a Notebook Instance Because No File Is Found in /tmp
Updated on 2025-06-06 GMT+08:00
An Error Occurs When You Run Code on a Notebook Instance Because No File Is Found in /tmp
Symptom
When a notebook instance is used to run code, the following error occurs:
FileNotFoundError: [Error 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', 'home/ma-user/work/SR/RDN_train_base']
Figure 1 Code running error

Possible Cause
Check whether a large amount of data is saved in /tmp.
Solution
- Go to the Terminal page. In the /tmp directory, run the du -sh * command to check the space usage of the directory.
sh-4.3$cd /tmp sh-4.3$du -sh * 4.0K core-js-banners 0 npm-19-41ed4c62 6.7M v8-compile-cache-1000
- Delete unnecessary large files.
- Delete the sample file test.txt: rm -f /home/ma-user/work/data/test.txt
- Delete the sample folder data: rm -rf /home/ma-user/work/data/
Parent topic: Code Running Failures
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot