install error linux centos7

User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: install error linux centos7

Post by fsteinmetz »

Dear Binbin,

For more information about how to run the code, you can have a look at section 2.1 of README.md, and also in example.py at the root of the polymer distribution.
Cheers,
François
lanzhiqishi
Posts: 23
Joined: Fri May 22, 2020 7:00 pm
company / institution: university of maine
Location: maine

Re: install error linux centos7

Post by lanzhiqishi »

Dear fsteinmetz;

when i run this code' python ./polymer_cli.py '/home/bjiang/Sentinel2/ningde20180807/GRANULE/L1C_T50RQQ_A007408_20180807T024116' result.nc'

get error below, please help me. Thanks

Best

Binbin


(binbin1) [bjiang@viz3]~/software/pythondepen/polymer-v4.13% python ./polymer_cli.py '/home/bjiang/Sentinel2/ningde20180807/GRANULE/L1C_T50RQQ_A007408_20180807T024116' result.nc
Starting processing at 2020-08-04 09:56:38.214733
Initialize MSI projection EPSG:32650
/home/bjiang/.conda/envs/binbin1/lib/python3.7/site-packages/pyproj/crs/crs.py:280: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable ... -in-proj-6
projstring = _prepare_from_string(projparams)
Trying to download https://oceandata.sci.gsfc.nasa.gov/cgi ... MI_24h.hdf ...
Cannot open cookies file ‘/home/bjiang/.urs_cookies’: No such file or directory
2020-08-04 09:56:52 URL:https://urs.earthdata.nasa.gov/oauth/au ... 2Frestrict [12671] -> "ANCILLARY/METEO/2018/219/N201821900_O3_AURAOMI_24h.hdf.tmp" [1]
Traceback (most recent call last):
File "./polymer_cli.py", line 35, in <module>
Level2(filename=args.output_file, fmt=args.fmt))
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/main.py", line 496, in run_atm_corr
with level2 as l2, level1 as l1:
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1.py", line 106, in __enter__
self.level1 = L1(self.filename, **self.kwargs)
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1_msi.py", line 151, in __init__
self.init_ancillary()
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1_msi.py", line 180, in init_ancillary
self.ozone = self.ancillary.get('ozone', self.date)
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/ancillary.py", line 242, in get
res = self.find_ozone(date)
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/ancillary.py", line 369, in find_ozone
f1 = self.try_resources(self.ozone_patterns, rolling(t0, self.delta, timedelta(days=1)))
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/ancillary.py", line 340, in try_resources
ret = self.download(url, target)
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/ancillary.py", line 306, in download
assert not fp.read(100).startswith(b'<!DOCTYPE html>'), errormsg
AssertionError: Error authenticating to NASA EarthData for downloading ancillary data. Please provide authentication through .netrc. See more information on https://support.earthdata.nasa.gov/inde ... l-and-wget
(binbin1) [bjiang@viz3]~/software/pythondepen/polymer-v4.13%
User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: install error linux centos7

Post by fsteinmetz »

Dear Binbin,

You need to provide credentials to NASA EarthData to access ancillary data.

As mentioned in the error message:
Error authenticating to NASA EarthData for downloading ancillary data. Please provide authentication through .netrc. See more information on https://support.earthdata.nasa.gov/inde ... l-and-wget

Cheers,
François
lanzhiqishi
Posts: 23
Joined: Fri May 22, 2020 7:00 pm
company / institution: university of maine
Location: maine

Re: install error linux centos7

Post by lanzhiqishi »

Dear steinmetz,

when I finish the login the NASA Earthdata, it still error. I do not know how to deal with it. could you help me? thanks. the code is below.



Best

Binbin

(binbin1) [bjiang@viz3]~/software/pythondepen/polymer-v4.13% python ./polymer_cli.py '/home/bjiang/Sentinel2/20160912midmaine/GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20160912T204513_A006400_T19TDJ_N02.04/IMG_DATA' 20160912.nc
Starting processing at 2020-08-20 10:40:46.681536
Initialize MSI projection EPSG:32619
/home/bjiang/.conda/envs/binbin1/lib/python3.7/site-packages/pyproj/crs/crs.py:280: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable ... -in-proj-6
projstring = _prepare_from_string(projparams)
Initializing output file "20160912.nc"
Traceback (most recent call last):
File "./polymer_cli.py", line 35, in <module>
Level2(filename=args.output_file, fmt=args.fmt))
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/main.py", line 517, in run_atm_corr
for block in block_iter:
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/main.py", line 434, in blockiterator
for block in level1.blocks(params.bands_read()):
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1_msi.py", line 401, in blocks
yield self.read_block(size, offset, bands_read)
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1_msi.py", line 332, in read_block
raw_data = self.read_TOA(band, size, offset)
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1_msi.py", line 272, in read_TOA
jp = Jp2k(self.get_filename(band))
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1_msi.py", line 262, in get_filename
assert len(filenames) == 1
AssertionError
(binbin1) [bjiang@viz3]~/software/pythondepen/polymer-v4.13%
User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: install error linux centos7

Post by fsteinmetz »

Dear Binbin,

You need to provide the granule directory like "S2A_OPER_MSI_L1C_TL_SGS__20160912T204513_A006400_T19TDJ_N02.04" , not IMG_DATA.
Please see section 2.3.4 of the README.
Cheers,
François
lanzhiqishi
Posts: 23
Joined: Fri May 22, 2020 7:00 pm
company / institution: university of maine
Location: maine

Re: install error linux centos7

Post by lanzhiqishi »

Dear fsteinmetz,

Thank you for reply. I follow your suggest, it still not work. Could you help me, Thanks


Best

Binbin





(binbin1) [bjiang@viz3]~/software/pythondepen/polymer-v4.13% python ./polymer_cli.py '/home/bjiang/Sentinel2/20160912midmaine/GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20160912T204513_A006400_T19TDJ_N02.04' /home/bjiang/20160912.nc
Traceback (most recent call last):
File "./polymer_cli.py", line 34, in <module>
run_atm_corr(Level1(args.input_file),
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1.py", line 36, in __init__
self.autodetect()
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1.py", line 61, in autodetect
raise Exception('Unable to detect sensor for file "{}"'.format(b))
Exception: Unable to detect sensor for file "S2A_OPER_MSI_L1C_TL_SGS__20160912T204513_A006400_T19TDJ_N02.04"
lanzhiqishi
Posts: 23
Joined: Fri May 22, 2020 7:00 pm
company / institution: university of maine
Location: maine

Re: install error linux centos7

Post by lanzhiqishi »

Dear

i fix it. it works. thank you for your help.


Best

Binbin
lanzhiqishi
Posts: 23
Joined: Fri May 22, 2020 7:00 pm
company / institution: university of maine
Location: maine

Re: install error linux centos7

Post by lanzhiqishi »

Dear fsteinmetz,

when I without '' resolution=20''. it works. but I add the code it not works. could you help me? Thanks

Best

Binbin




(binbin1) [bjiang@viz3]~/software/pythondepen/polymer-v4.13% python ./polymer_cli.py '/home/bjiang/Sentinel2/20160912midmaine/GRANULE/S2A_OPER_MSI_L1C_TL_SGS__20160912T204513_A006400_T19TDJ_N02.04',resolution='20' /home/bjiang/20160912.nc
Traceback (most recent call last):
File "./polymer_cli.py", line 34, in <module>
run_atm_corr(Level1(args.input_file),
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1.py", line 36, in __init__
self.autodetect()
File "/nfs3-home/bjiang/software/pythondepen/polymer-v4.13/polymer/level1.py", line 61, in autodetect
raise Exception('Unable to detect sensor for file "{}"'.format(b))
Exception: Unable to detect sensor for file "S2A_OPER_MSI_L1C_TL_SGS__20160912T204513_A006400_T19TDJ_N02.04,resolution=20"
(binbin1) [bjiang@viz3]~/software/pythondepen/polymer-v4.13%
User avatar
fsteinmetz
Site Admin
Posts: 140
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: install error linux centos7

Post by fsteinmetz »

There is a quotation mark error, the argument must be provided outside of the string.
lanzhiqishi
Posts: 23
Joined: Fri May 22, 2020 7:00 pm
company / institution: university of maine
Location: maine

Re: install error linux centos7

Post by lanzhiqishi »

Dear fsteinmetz,

Thank you for your reply. i do not know understand how could fix it. could you say more clear. thanks

Best

Binbin
Post Reply