climate_indices icon indicating copy to clipboard operation
climate_indices copied to clipboard

SPI_indices running error- nco.nco.NCOException: (returncode:1) b'The system cannot find the path specified.\r\n'

Open PawanIndia87 opened this issue 4 years ago • 2 comments

[**(indices_env)](url error ) PS C:\Users\Pawan kumar> process_climate_indices --index spi --periodicity monthly --netcdf_precip E:\work@home\data\IMD_monsum_rf.nc --var_name_precip rf --output_file_base E:\work@home\data\IMD_monsum --scales 6 12 --calibration_start_year 1901 --calibration_end_year 2019 --multiprocessing all 2020-08-09 20:21:25 INFO Start time: 2020-08-09 20:21:25.672026 Error in calling operator ncpdq with:

C:\Users\Pawan kumar.conda\envs\indices_env\Library\bin\ncpdq -a lat,lon,time -O --output=C:\Users\PAWANK~1\AppData\Local\Temp\ncpdq_IMD_monsum_rf.nc3wlftk4a.tmp E:\work@home\data\IMD_monsum_rf.nc <<< Inputs: E:\work@home\data\IMD_monsum_rf.nc b'The system cannot find the path specified.\r\n' 2020-08-09 20:21:40 ERROR Failed to complete Traceback (most recent call last): File "c:\users\pawan kumar\appdata\local\programs\python\python38\lib\site-packages\climate_indices_main_.py", line 1664, in main netcdf_precip = prepare_file(arguments.netcdf_precip, File "c:\users\pawan kumar\appdata\local\programs\python\python38\lib\site-packages\climate_indices_main.py", line 1533, in _prepare_file netcdf_file = nco.ncpdq(input=netcdf_file, File "c:\users\pawan kumar\appdata\local\programs\python\python38\lib\site-packages\nco\nco.py", line 342, in get raise NCOException(**retvals) nco.nco.NCOException: (returncode:1) b'The system cannot find the path specified.\r\n' Traceback (most recent call last): File "c:\users\pawan kumar\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main return run_code(code, main_globals, None, File "c:\users\pawan kumar\appdata\local\programs\python\python38\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\Pawan kumar\AppData\Local\Programs\Python\Python38\Scripts\process_climate_indices.exe_main.py", line 7, in File "c:\users\pawan kumar\appdata\local\programs\python\python38\lib\site-packages\climate_indices_main.py", line 1664, in main netcdf_precip = prepare_file(arguments.netcdf_precip, File "c:\users\pawan kumar\appdata\local\programs\python\python38\lib\site-packages\climate_indices_main.py", line 1533, in _prepare_file netcdf_file = nco.ncpdq(input=netcdf_file, File "c:\users\pawan kumar\appdata\local\programs\python\python38\lib\site-packages\nco\nco.py", line 342, in get raise NCOException(retvals) nco.nco.NCOException: (returncode:1) b'The system cannot find the path specified.\r\n'

PawanIndia87 avatar Aug 09 '20 14:08 PawanIndia87

My suggestion is that this is being caused by the non-standard path of the file that is being specified, i.e., E:\work@home\data\IMD_monsum_rf.nc

The component at play here, NCO, does not play well with Windows in my experience, as it's primarily a tool developed for use on Linux and the developers typically don't do much testing on Windows.

I suggest trying using the input file in a different location. Also, try using forward slashes rather than backslashes. For example:

C:/Users/Pawan kumar/data/IMD_monsum_rf.nc

Like NCO this package has been developed for Linux users but we strive to support Windows as well. If you want to send a link to your file I can try to reproduce and debug this error on a Windows laptop.

monocongo avatar Aug 17 '20 16:08 monocongo

Hi Pawand, were you able to correct this error. I also have same issue.

Jahangirali09 avatar Jan 15 '21 06:01 Jahangirali09

Resolved by PR #487

monocongo avatar Dec 18 '22 02:12 monocongo