Mage.ai is a great tool for data nerds, but it’s not completely done when it comes to user experience just yet. We might encounter some errors that are inherently of a primitive nature, making them sometimes challenging to identify. One of these errors is Error [Errno 2] No such file or directory, and today, I inadvertently ran into this error.

Error [Errno 2] No such file or directory – unable to locate the file

In Mage.ai, it’s important to delete files only through the application’s tools (buttons). If we delete a file “forcefully,” there is a risk that there might be references to that file in yaml files and similar places. However, we can also encounter this error due to our own oversight. Let me try to replicate this error here.

This also applies to the error: The system cannot find the file specified.

Let’s take a file called “kind_sky.py” (data_loader) as an example. I often open this file in the right section of the application window. I have a habit of browsing files directly in the application instead of using tools like Visual Studio and the like. So, I sometimes accumulate tabs there and forget that this file is open.

No such file or directory

If I delete the file, an error occurs – which is my own mistake. However, the application could potentially automatically rectify this situation. Now, this message keeps appearing every time I refresh the browser until I notice the error.

[Errno 2] No such file or directory

I searched everywhere, in files and logs, and then I realized that the solution is much simpler. Perhaps this will help someone. If you have any other problems, don’t hesitate to ask the Mage.ai community on Slack.

>> For more articles on Mage.ai please see category page

Rate this post

Ing. Jan Zedníček - Data Engineer & Controlling

My name is Jan Zedníček and I have been working as a freelancer for many companies for more than 10 years. I used to work as a financial controller, analyst and manager at many different companies in field of banking and manufacturing. When I am not at work, I like playing volleyball, chess, doing a workout in the gym.

🔥 If you found this article helpful, please share it or mention me on your website

Leave a Reply

Your email address will not be published. Required fields are marked *