I have a Java program that manages data. When it wants to create a report from said data it does so via saving a JSON file with the relevant data for the report and then setting off the python script via the use of a ProcessBuilder object. I'm however having a weird error should I try and extract data from the output of the python script.

```
ProcessBuilder pythonProcess = new 
ProcessBuilder("python","ReportingTool.py");
pythonProcess.directory(new File("invoice_python_files\\"));
Process pythonRunnable =pythonProcess.start();
/*
BufferedReader outputReader = new BufferedReader(new 
InputStreamReader(pythonRunnable.getInputStream()));
BufferedReader errorReader = new BufferedReader(new 
InputStreamReader(pythonRunnable.getErrorStream()));
String line =null;
System.out.println("<ERROR>");
while ( (line = errorReader.readLine()) != null)
    System.out.println(line);

System.out.println("</ERROR>");
System.out.println("<Output">)

while ( (line = outputReader.readLine()) != null)
    System.out.println(line);

System.out.println("</OUTPUT>");
 */

```

This works fine and produces the report as expected (without the input stream code). If I then uncomment the code I get an error from the python script.

```
 File "C:\Users\o.cohen\AppData\Local\Programs\Python\Python36- 
 32\lib\json\decoder.py", line 357, in raw_decode
 raise JSONDecodeError("Expecting value", s, err.value) from None
 json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

```

I don't understand how the java process is causing the error and more importantly how to fix it. Below is the code that causes the error (specifically the last line:

```
with open("InvoiceMakerDoc.json") as json_file:
    json_data=json_file.read()
    decoded_data =json.loads(json_data)

```