Error: [WinError 32] The process does not have access to the file because it is being used by anothe

33 views
Skip to first unread message

Diego García Díaz

unread,
Apr 19, 2018, 9:59:55 AM4/19/18
to RSGISLib Support
Hi, 

I am trying to correct a Landsat 5 TM with the exmaple that I found in the arsci web: https://www.arcsi.remotesensing.info/cmdtools.html (with the same data that you have available for the tutorial), but I get this error message, and at the end of teh process I only get three files, that seems to be without any data on them: 1) LS5TM_19950815_lat52lon278_r24p203_valid.kea 2) LS5TM_19950815_lat52lon278_r24p203_validvldpxlmsk.kea 3) LS5TM_19950815_lat52lon278_r24p203_viewangle.kea

My Command Line:

"""arcsi.py -s ls5tm -p CLOUDS DOSAOTSGL STDSREF SATURATE TOPOSHADOW FOOTPRINT METADATA -o C:/Tests/arsci/output --stats --format KEA --tmpath C:/temp --dem C:/Tests/arsci/UKSRTM_90m.kea --k  clouds.kea meta.json sat.kea toposhad.kea valid.kea stdsref.kea -i C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1/LT05_L1TP_204024_19940616_20170114_01_T1_MTL.txt"""

The error message is this:

"""Start Time: 15:47:48, Thu Apr 04 2018.
Reading header file
Extracting Header Values

Input imagery as listed in header file is present.

Get aero profile from image...
Aerosol Profile =  Maritime

Get atmos profile from image...
Northern Hemisphere
Atmosphere Profile =  MidlatitudeSummer

Image Base Name: LS5TM_19940616_lat52lon429_r24p204

Checking Input Images are valid
Create the valid data mask
0) C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1\LT05_L1TP_204024_19940616_20170114_01_T1_B1.TIF
1) C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1\LT05_L1TP_204024_19940616_20170114_01_T1_B2.TIF
2) C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1\LT05_L1TP_204024_19940616_20170114_01_T1_B3.TIF
3) C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1\LT05_L1TP_204024_19940616_20170114_01_T1_B4.TIF
4) C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1\LT05_L1TP_204024_19940616_20170114_01_T1_B5.TIF
5) C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1\LT05_L1TP_204024_19940616_20170114_01_T1_B7.TIF
6) C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1\LT05_L1TP_204024_19940616_20170114_01_T1_B6.TIF
New image width = 8151 height = 7511 bands = 1
Started .0..10..20..30..40..50..60..70..80..90..100. Complete.
Get Image Min and Max.
Started .0..10..20..30..40..50..60..70..80..90..100. Complete.
Get Image Histogram.
Started .0..10..20..30..40..50..60..70..80..90..100. Complete.
Adding Histogram and Colour Table to image file
Started .0..10..20..30..40..50..60..70..80..90..100. Complete.
Started .0..10..20..30..40..50..60..70..80..90..100. Complete.
Writing data to output RAT
Open input image: 'C:/Tests/arsci/output\LS5TM_19940616_lat52lon429_r24p204_validvldpxlmsk.kea'
Center Line: Top[436470, 5817570][384135, 5642550]
Started .0..10..20..30..40..50..60..70..80..90..100. Complete.
New image width = 8151 height = 7511 bands = 1
Started .0..10..20..30..40..50..60..70..80..90..100. Complete.
Deleting file: C:/Tests/arsci/output\LS5TM_19940616_lat52lon429_r24p204_validvldpxlmsk.kea
Input Header: 'C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1/LT05_L1TP_204024_19940616_20170114_01_T1_MTL.txt'
Output Basename: 'LS5TM_19940616_lat52lon429_r24p204'
Error: [WinError 32] El proceso no tiene acceso al archivo porque está siendo utilizado por otro proceso: 'C:/Tests/arsci/output\\LS5TM_19940616_lat52lon429_r24p204_validvldpxlmsk.kea'
Error: The following products were not generated:
METADATA TOPOSHADOW TOA SREF THERMAL SATURATE CLOUDS DOSAOTSGL STDSREF RAD FOOTPRINT
Input Header: 'C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1/LT05_L1TP_204024_19940616_20170114_01_T1_MTL.txt'
Output Basename: 'LS5TM_19940616_lat52lon429_r24p204'
ARCSI took 00:00:11 to process the input image. Thank you for using ARCSI."""

Thanks a lot!
Best Regards

Daniel Clewley

unread,
Apr 20, 2018, 1:57:32 AM4/20/18
to Diego García Díaz, RSGISLib Support
Hi Diego,

Can you try running the command with the `--debug` flag which will print more detailed output about what went wrong.

Also when posting please provide some information about the version of ARCSI you are using, platform (macOS, Linux or Windows), Python version and how you installed ARCSI (conda-forge, compiled from source or other).

Thanks,

Dan

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.

Diego García Díaz

unread,
Apr 20, 2018, 4:04:37 AM4/20/18
to RSGISLib Support
Hi Dan,

Sorry for the lack of info. I installed arsci in a PC with Windows 10, and via Conda Forge in an enviroment with python 3.5. Arcsi version is 2.2.24.

I do the --debug flag and this is the result:

"""(arcsienv) C:\Users\equipo>arcsi.py -s ls5tm -p CLOUDS DOSAOTSGL STDSREF SATURATE TOPOSHADOW FOOTPRINT METADATA -o C:/Tests/arsci/output --stats --format KEA --tmpath C:/temp --dem C:/Tests/arsci/UKSRTM_90m.kea --k  clouds.kea meta.json sat.kea toposhad.kea valid.kea stdsref.kea -i C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1/LT05_L1TP_204024_19940616_20170114_01_T1_MTL.txt --debug
C:\Users\equipo\Anaconda3\envs\arcsienv\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
ARCSI 2.2.24 Copyright (C) 2017 Pete Bunting, Dan Clewley
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; See website (http://www.rsgislib.org/arcsi).
Bugs are to be reported to rsgislib...@googlegroups.com.

Start Time: 10:01:47, Fri Apr 04 2018.
SATURATE TOA RAD FOOTPRINT SREF DOSAOTSGL TOPOSHADOW STDSREF CLOUDS METADATA THERMAL
Input Header: 'C:/Tests/arsci/LT05_L1TP_204024_19940616_20170114_01_T1/LT05_L1TP_204024_19940616_20170114_01_T1_MTL.txt'
Output Basename: 'LS5TM_19940616_lat52lon429_r24p204'
Traceback (most recent call last):
  File "C:\Users\equipo\Anaconda3\envs\arcsienv\Scripts\\arcsi-script.py", line 605, in <module>
    arcsilib.arcsirun.runARCSI(args.inputheader, args.imagefile, args.cloudmask, args.sensor, args.inwkt, args.format, args.outpath, args.outbasename, args.outwkt, args.outproj4, args.projabbv, args.ximgres, args.yimgres, args.prods, args.stats, args.aeropro, args.atmospro, args.aeroimg, args.atmosimg, args.grdrefl, args.surfacealtitude, args.atmosozone, args.atmoswater, atmosOZoneWaterSpecified, args.aerowater, args.aerodust, args.aerooceanic, args.aerosoot, aeroComponentsSpecified, args.aot, args.vis, args.tmpath, args.minaot, args.maxaot, args.lowaot, args.upaot, args.dem, args.demnodata, args.aotfile, (not args.localdos), args.dosout, args.simpledos, args.debug, args.scalefac, args.interp, args.interpresamp, args.cs_initdist, args.cs_initminsize, args.cs_finaldist, args.cs_morphop, args.fullimgouts, args.checkouts, args.classmlclouds, args.cloudtrainclouds, args.cloudtrainother, args.resample2lowres, args.keepfileends)
  File "C:\Users\equipo\Anaconda3\envs\arcsienv\lib\site-packages\arcsilib\arcsirun.py", line 1276, in runARCSI
    createValidMaskViewAngle(paramsObj)
  File "C:\Users\equipo\Anaconda3\envs\arcsienv\lib\site-packages\arcsilib\arcsirun.py", line 618, in createValidMaskViewAngle
    paramsObj.validMaskImage = paramsObj.sensorClass.generateValidImageDataMask(paramsObj.outFilePath, outName, paramsObj.viewAngleImg, paramsObj.outFormat)
  File "C:\Users\equipo\Anaconda3\envs\arcsienv\lib\site-packages\arcsilib\arcsisensorlandsat5tm.py", line 453, in generateValidImageDataMask
    rsgisUtils.deleteFileWithBasename(tmpValidPxlMsk)
  File "C:\Users\equipo\Anaconda3\envs\arcsienv\lib\site-packages\rsgislib\__init__.py", line 277, in deleteFileWithBasename
    os.remove(file)
PermissionError: [WinError 32] El proceso no tiene acceso al archivo porque está siendo utilizado por otro proceso: 'C:/Tests/arsci/output\\LS5TM_19940616_lat52lon429_r24p204_validvldpxlmsk.kea'"""

Thank you so much,
Regards
Reply all
Reply to author
Forward
0 new messages