"Error -254: Error opening file. Unit"

Post Reply
ags-tolson
Posts: 22
Joined: Wed Oct 04, 2017 9:14 pm

"Error -254: Error opening file. Unit"

Post by ags-tolson »

Is there any way I can get more information about this error? A verbosity setting or logging I can turn on?

Code: Select all

% ACOLITE: Running ACOLITE for 1 image.
Error -254:  Error opening file. Unit
The context is that I'm running the latest acolite on the Linux command line, and pointing it at an unzipped sentinel-2 product, specifically:

Code: Select all

S2A_OPER_PRD_MSIL1C_PDMC_20160508T154402_R126_V20150810T164209_20150810T164209.SAFE/
Here's what I've done so far: Checked that directory and all its parents to confirm they're readable and traversable by the acolite process's user, checked the same for the acolite config file, and similarly checked the acolite directory. I've also re-run acolite with a new-style sentinel-2 asset (post December 2016, when they changed the format).
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: "Error -254: Error opening file. Unit"

Post by quinten »

I haven't seen this error before! Unfortunately there is not much more debugging information available from the current distribution.

Could you post the full command you are using?
ags-tolson
Posts: 22
Joined: Wed Oct 04, 2017 9:14 pm

Re: "Error -254: Error opening file. Unit"

Post by ags-tolson »

Sure thing, thanks for getting back to me so quickly! This is technically running inside a python program, but I've had the same result running it directly on the command-line:

Code: Select all

rio:/tmp/aco-tmpdir$ ls
S2A_MSIL1C_20170110T153611_N0204_R111_T19TCJ_20170110T154029.SAFE  command  settings.cfg
rio:/tmp/aco-tmpdir$ cat command  
dir=/tmp/aco-tmpdir

cd /opt/acolite_linux/

idl -IDL_CPU_TPOOL_NTHREADS 1 -rt=acolite.sav \
    -args settings=$dir/settings.cfg run=1 output=$dir \
        image=$dir/S2A_MSIL1C_20170110T153611_N0204_R111_T19TCJ_20170110T154029.SAFE
rio:/tmp/aco-tmpdir$ bash command
IDL Version 8.4.1 (linux x86_64 m64). (c) 2015, Exelis Visual Information Solutions, Inc.
Installation number: 217856.
Licensed for use by: Applied GeoSolutions, LLC

% ACOLITE: Running ACOLITE for 1 image.
Error -254:  Error opening file. Unit
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: "Error -254: Error opening file. Unit"

Post by quinten »

The command looks alright, so it might be an underlying IDL or system issue. I see you are using a licensed IDL version, so you might be able to get a more complete message if you run in interactive mode:

Code: Select all

Launch idl from a terminal:
> cd ../acolite_linux
> idl

Restore the acolite.sav file from the idl prompt:
> restore, "acolite.sav"

Make dir variable and run acolite from the idl prompt:
> dir = "/tmp/aco-tmpdir"
> acolite, settings=dir+"/settings.cfg", run=1, output=dir+"/", image=dir+"/S2A_MSIL1C_20170110T153611_N0204_R111_T19TCJ_20170110T154029.SAFE"
Let me know if you get more information in this way.
ags-tolson
Posts: 22
Joined: Wed Oct 04, 2017 9:14 pm

Re: "Error -254: Error opening file. Unit"

Post by ags-tolson »

Thanks for the suggestion; unfortunately, it's the same error again:

Code: Select all

IDL> print, dir
/tmp/aco-tmpdir
IDL> acolite, settings=dir+"/revised.cfg", run=1, image=dir+"/S2A_MSIL1C_20170110T153611_N0204_R111_T19TCJ_20170110T154029.SAFE"
% ACOLITE: Running ACOLITE for 1 image.
Error -254:  Error opening file. Unit
I had to put the output keyword argument in the config file because it claims not to support it for the procedure call; I kept getting an error about calling it wrong:

Code: Select all

IDL> help, /routines ; output trimmed obviously
. . .
ACOLITE                  DEBUG HEADLESS IMAGE MERGE_TILES RUN SETTINGS 
. . .
For my own education I manually generated the error report for file-not-found:

Code: Select all

IDL> openr, 1, 'no-such-file.txt'
% OPENR: Error opening file. Unit: 1, File: no-such-file.txt
  No such file or directory
That really looks like the error report is being cut off or truncated, and the needed information is being lost. Does that help any?
quinten
Posts: 1019
Joined: Tue Mar 03, 2015 8:13 am

Re: "Error -254: Error opening file. Unit"

Post by quinten »

I downloaded your scene from the SciHub and could process it with no problem. Could you also share your settings file? Are you able to process this file from the GUI with the same settings?
ags-tolson
Posts: 22
Joined: Wed Oct 04, 2017 9:14 pm

Re: "Error -254: Error opening file. Unit"

Post by ags-tolson »

Thanks again for the follow-up and especially for taking the time to actually run it. I wanted to let you know that the issue mysteriously resolved itself in the mean time; we never did figure out why we got that error.
Post Reply