'File not found' error when executing %run magic command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 01:57 AM
I'm just walking through a simple exercise presented in the Databricks Platform Lab notebook, in which I'm executing a remote notebook from within using the %run command. The remote notebook resides in the same directory as the Platform Lab notebook, and is named 'Notebook_B'. However, when I try to run it, a 'File not found' error is thrown. I've determined that the relative path to the notebook is correct. Might I be missing some extra bit of configuration? I've attached screenshots to illustrate.
Thanks for your time and assistance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2023 01:32 AM
Hi Kaniz,
Thank you for taking the time to respond to my query. I will take your advice on board and give it a shot. Much appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 03:52 AM
I have stepped through your recommendations and I've not yet been able to successfully execute the %run command. I will check again and report back! Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 04:49 AM
Thank you for taking the time to respond to my query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 06:47 AM
The %run command is a specific Jupyter magic command.
The ipykernel used in Databricks examines the initial line of code to determine the appropriate compiler or language for execution.
To minimize the likelihood of encountering errors, it is advisable to position the %run command as the first line in the cell and not have any command in the cell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 03:12 AM
Hi,
I'm trying to run a notebook nested in a for loop in another notebook. %run command doesn't work in this case. Now I see the reason. Do you happen to know if there are other ways to run a notebook instead of using %run? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2024 08:15 AM
This is exactly what I encountered. Even a # Comment line was giving me the same error. Removing the comment from that cell worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2024 12:21 AM
I have seen this error popping up when you define a Python file without the header:
![](/skins/images/582998B45490C7019731A5B3A872C751/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/582998B45490C7019731A5B3A872C751/responsive_peak/images/icon_anonymous_message.png)