I ported a working notebook from my computer to RPi where Mathematica was pre-installed.
It starts nicely, but stops as it tries to read a simple text file.
The very first lines are these:
dict0 = ToString /@ ReadList["sv_JSPFirefoxRensadCRUTF-8.txt"]
ReadList::noopen: Cannot open sv_JSPFirefoxRensadCRUTF-8.txt.
I have not changed anything, same text file etc.
Any suggestions would be much appreciated. Thank you very much in advance.
The error message usually indicates that Mathematica cannot find the file you ask it to read.
ReadList will import from the directory specified by Directory not $HomeDirectory.
If the file is in the wrong spot, then ReadList will not be able to find it.
You can set the working directory by SetDirectory. For example, SetDirectory[NotebookDirectory] will set the directory of the current evaluation notebook as the working directory.
Thank you, Eun!
So my solution was to write
Assuming that the files are in the same folder (directory) as the notebook itself. It all works nicely.