seadas installation problem

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
jay_cable
Posts: 20
Joined: Wed Feb 01, 2017 4:22 pm America/New_York
Answers: 0

seadas installation problem

by jay_cable » Wed Jun 02, 2021 5:32 pm America/New_York

I am having issues installing OCSSW / seadas.

Any suggestions as to what I could be doing wrong?
This is how I am doing it(I also have a .netrc file setup like suggested). :


[processing@nrt-seadas-prod-0001 ocssw]$ wget https://oceandata.sci.gsfc.nasa.gov/man ... tall_ocssw
--2021-06-02 21:21:39-- https://oceandata.sci.gsfc.nasa.gov/man ... tall_ocssw
Resolving oceandata.sci.gsfc.nasa.gov (oceandata.sci.gsfc.nasa.gov)... 169.154.128.84, 2001:4d0:2418:128::84
Connecting to oceandata.sci.gsfc.nasa.gov (oceandata.sci.gsfc.nasa.gov)|169.154.128.84|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22276 (22K) [application/octet-stream]
Saving to: ‘install_ocssw’

100%[====================================================================================================================================================================>] 22,276 --.-K/s in 0.1s

2021-06-02 21:21:39 (215 KB/s) - ‘install_ocssw’ saved [22276/22276]

[processing@nrt-seadas-prod-0001 ocssw]$ wget https://oceandata.sci.gsfc.nasa.gov/man ... anifest.py
--2021-06-02 21:21:47-- https://oceandata.sci.gsfc.nasa.gov/man ... anifest.py
Resolving oceandata.sci.gsfc.nasa.gov (oceandata.sci.gsfc.nasa.gov)... 169.154.128.84, 2001:4d0:2418:128::84
Connecting to oceandata.sci.gsfc.nasa.gov (oceandata.sci.gsfc.nasa.gov)|169.154.128.84|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27787 (27K) [application/octet-stream]
Saving to: ‘manifest.py’

100%[====================================================================================================================================================================>] 27,787 --.-K/s in 0.1s

2021-06-02 21:21:47 (229 KB/s) - ‘manifest.py’ saved [27787/27787]

[processing@nrt-seadas-prod-0001 ocssw]$ chmod +x ./install_ocssw
[processing@nrt-seadas-prod-0001 ocssw]$ ./install_ocssw --install_dir /opt/modis/ocssw/ --tag V2020.2 --seadas --modisa --modist
Installing (1 of 9) - bin_linux_64
Installing (2 of 9) - lib_linux_64
Installing (3 of 9) - opt_linux_64
Installing (4 of 9) - root
Installing (5 of 9) - common
Installing (6 of 9) - modis
Installing (7 of 9) - modisa
Installing (8 of 9) - modist
Installing (9 of 9) - ocrvc
Installing lut - modisa
Traceback (most recent call last):
File "/opt/modis/ocssw//bin/update_luts", line 63, in <module>
luts.get_luts()
File "/opt/modis/ocssw/bin/seadasutils/LutUtils.py", line 132, in get_luts
check_times=True)
File "/opt/modis/ocssw/bin/seadasutils/JsonUtils.py", line 198, in download_allfiles
all_links = self.get_links(url, regex=regex)
File "/opt/modis/ocssw/bin/seadasutils/JsonUtils.py", line 165, in get_links
with session.get(url, stream=True, timeout=self.timeout) as response:
AttributeError: __enter__
Error: return = 1 : trying to run command = /opt/modis/ocssw//bin/ocssw_runner --ocsswroot /opt/modis/ocssw/ update_luts modisa

Tags:

jay_cable
Posts: 20
Joined: Wed Feb 01, 2017 4:22 pm America/New_York
Answers: 0

Re: seadas installation problem

by jay_cable » Thu Jun 03, 2021 1:15 pm America/New_York

Using a newer "tag" also fails, as does just using the "--direct_broadcast" option.

This is on a centos 7 system, if that matters.


[processing@nrt-seadas-prod-0001 ocssw]$ ./install_ocssw --install_dir /opt/modis/ocssw/ --tag V2021.1 --seadas --modisa --modist
Installing (1 of 9) - bin_linux_64
Installing (2 of 9) - lib_linux_64
Installing (3 of 9) - opt_linux_64
Installing (4 of 9) - root
Installing (5 of 9) - common
Installing (6 of 9) - modis
Installing (7 of 9) - modisa
Installing (8 of 9) - modist
Installing (9 of 9) - ocrvc
Installing lut - modisa
Traceback (most recent call last):
File "/opt/modis/ocssw//bin/update_luts", line 63, in <module>
luts.get_luts()
File "/opt/modis/ocssw/bin/seadasutils/LutUtils.py", line 132, in get_luts
check_times=True)
File "/opt/modis/ocssw/bin/seadasutils/JsonUtils.py", line 198, in download_allfiles
all_links = self.get_links(url, regex=regex)
File "/opt/modis/ocssw/bin/seadasutils/JsonUtils.py", line 165, in get_links
with session.get(url, stream=True, timeout=self.timeout) as response:
AttributeError: __enter__
Error: return = 1 : trying to run command = /opt/modis/ocssw//bin/ocssw_runner --ocsswroot /opt/modis/ocssw/ update_luts modisa
[processing@nrt-seadas-prod-0001 ocssw]$ ./install_ocssw --install_dir /opt/modis/ocssw/ --tag V2021.1 --direct_broadcast
Installing (1 of 9) - bin_linux_64
Installing (2 of 9) - lib_linux_64
Installing (3 of 9) - opt_linux_64
Installing (4 of 9) - root
Installing (5 of 9) - common
Installing (6 of 9) - modis
Installing (7 of 9) - modisa
Installing (8 of 9) - modist
Installing (9 of 9) - ocrvc
Installing lut - modisa
Traceback (most recent call last):
File "/opt/modis/ocssw//bin/update_luts", line 63, in <module>
luts.get_luts()
File "/opt/modis/ocssw/bin/seadasutils/LutUtils.py", line 132, in get_luts
check_times=True)
File "/opt/modis/ocssw/bin/seadasutils/JsonUtils.py", line 198, in download_allfiles
all_links = self.get_links(url, regex=regex)
File "/opt/modis/ocssw/bin/seadasutils/JsonUtils.py", line 165, in get_links
with session.get(url, stream=True, timeout=self.timeout) as response:
AttributeError: __enter__
Error: return = 1 : trying to run command = /opt/modis/ocssw//bin/ocssw_runner --ocsswroot /opt/modis/ocssw/ update_luts modisa

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 259
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Been thanked: 2 times

Re: seadas installation problem

by OB SeaDAS - dshea » Thu Jun 03, 2021 2:00 pm America/New_York

This is the problem:
AttributeError: __enter__

This happens if you are using an old version of requests.
What python3 are you using?
What version of requests?

don

jay_cable
Posts: 20
Joined: Wed Feb 01, 2017 4:22 pm America/New_York
Answers: 0

Re: seadas installation problem

by jay_cable » Thu Jun 03, 2021 2:05 pm America/New_York

https://seadas.gsfc.nasa.gov/requirements/
"Says 3.6 or above" and "Requests library (2.0 or greater) must also be installed"
Which I think this system has.

[processing@nrt-seadas-prod-0001 ocssw]$ python3 --version
Python 3.6.8

[processing@nrt-seadas-prod-0001 ocssw]$ pip3 freeze | grep -i request
requests==2.14.2

jay_cable
Posts: 20
Joined: Wed Feb 01, 2017 4:22 pm America/New_York
Answers: 0

Re: seadas installation problem

by jay_cable » Thu Jun 03, 2021 3:17 pm America/New_York

I updated the python requests library to 2.25.1 and it appears to work now.

You guys should update the requirements, as there is a 2+ version that ships with centos/rhel 7 that appears not to work.

[processing@nrt-seadas-prod-0001 ocssw]$ pip3 freeze | grep -i request
requests==2.25.1

thanks!

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 259
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Been thanked: 2 times

Re: seadas installation problem

by OB SeaDAS - dshea » Mon Jun 07, 2021 8:16 am America/New_York

Yes, it looks like the context manager support was added in version requests 2.18.0. We will get the requirements updated

Thank You

don

Post Reply