Skip to main content

front end - Import error when opening empty notebook


When opening notebooks, sometimes, in the messages window I get:


During evaluation of In[1]:=
... Import: File not found during Import

and also get a second window that only contains $Failed


There is nothing wrong with the notebook being opened. I reduced it using a text editor all the way down to:


Notebook[{Cell[CellGroupData[{}, Open  ]]}]


and I still get the error. I also deleted my Front End init.m with no effect on this. In Mathematica 11, we can do a stack trace on generated errors. By doing so, I got this trace:


Message[Import::nffil,Import]
Message[Import::nffil,Import];Throw[$Failed];
ToBoxes[Import[ToFileName[-directlaunch]]]
TimeConstrained[ToBoxes[Import[ToFileName[-directlaunch]]],6.]
TimeConstrained[TimeConstrained[ToBoxes[Import[ToFileName[-directlaunch]]],6.],9.]

So my questions are:



  • What are steps happen when opening a notebook?


  • Is a command like TimeConstrained[TimeConstrained[ToBoxes[Import[ToFileName[-directlaunch]]],6.],9.] one of these steps?

  • What is it trying to import?


This can probably be solved by resetting all configuration files and deleting all the cache files, but I would like to understand why is this happening.


I am using Mathematica 11.0.1.0 under Windows 7



Answer



This is a Windows 7 specific issue, likely unrelated to your specific configuration. To fix it, right click on a .nb file, go to "Properties" and ensure "Opens with" is set to the latest version of Mathematica installed on your computer.


Comments