The strange thing is that when I do the call in PyCharm it works fine, but when I call the batch file in Anaconda prompt I started getting this error.
I created batch file because I had memory problems when processing many images; this way I was doing it one at a time. I used this batch call already for successfully processed 2017 and 2018 data. I wonder what has happened because no change was made. Any solution, any idea?
Still having this issue!
Additional information is that the single call in Anaconda prompt is doing fine, like the call in PyCharm.
But the batch call in Anaconda is throwing error, although in the past it was working fine with batch as well.
No changes were made in the code however.
If you are already on the version 6 track, these are the right ways to update the installation.
Only if you are still on version 5, then you need to reinstall SNAP. But I think you use since quite some time version 6. So you have the most recent version if nothing comes in.
But the problem you have described initially sounds like a problem with the environment settings. Maybe you have two SNAP installation one is used from PyCharm and the other from the command line. Might also depend on which Anaconda environment is activated. Maybe there is an old environment active?
However, a NullPointerException is always the fault of the developer and not of the user.
Unfortunately, the exception output from with snappy is not satisfying and does not allow identifying where the exception happens.
Could you adjust the debug property in the snappy.ini.
Set it to True and remove the comment char.
–> debug: True
Maybe the output will be more helpful in this case.
Invalid maximum heap size: -Xmx11G
Traceback (most recent call last):
File “C:\Users\Milos\PycharmProjects\SAR\SAR_process_all.py”, line 1, in
File “C:\Users\Milos\Anaconda3\envs\SAR\lib\site-packages\snappy_init_.py”, line 235, in
RuntimeError: jpy: failed to create Java VM
Strange for me is that exactly the same code is working perfectly fine with 2017 data. I take care when selecting and processing the appropriate environment, in this case called “SAR”.