1

So I have this file located in a specific directory.

enter image description here

Here I am trying to get access to my file:

public static void main(String[] args) {
    try {
        PythonInterpreter interpreter = new PythonInterpreter();
        interpreter.execfile("C:/Users/schueler/Desktop/TestForPhyton/testPython.py");
    } catch (Exception ex) {
        System.out.println(""+ex);
    }
}

I get this error:

IOError: (2, 'File not found - C:\\Users\\schueler\\Desktop\\TestForPhyton\\testPython.py (Das System kann die angegebene Datei nicht finden)')
Lebron11
  • 656
  • 7
  • 18

1 Answers1

1

Spelling mistake.

testPython.py ==> testPyhton.py (in the directory)

There are autocomplete tools, ide available to avoid these kind of mistakes

arunp9294
  • 767
  • 5
  • 15