Welcome to the Earthdata Forum! Here, the scientific user community and subject matter experts from NASA Distributed Active Archive Centers (DAACs), and other contributors, discuss research needs, data, and data applications.
by zhigang » Fri Feb 02, 2024 12:04 pm America/New_York
Dear all,
I have not used seadas for about one year and re-instailled it to process some modis aqua data with l2gen (ocssw V2023.3). However, the getanc did not work. The detail of error was:
getanc -cv /home/ubuntu/data/NorthA/tmp/A2002243182000.L1B_LAC
ancillary_data.db
Searching database: /home/ubuntu/ocssw/var/log/ancillary_data.db
Aqua
Input file: /home/ubuntu/data/NorthA/tmp/A2002243182000.L1B_LAC
Sensor : Aqua
Start time: 2002-08-31T18:20:00
End time : 2002-08-31T18:24:59
OBPG session started
Downloading A2002243182000.anc.server ( 0.00 MBs)
[==================================================]
...Done
Traceback (most recent call last):
File "/home/ubuntu/ocssw/bin/getanc", line 149, in <module>
exit(main())
^^^^^^
File "/home/ubuntu/ocssw/bin/getanc", line 142, in main
g.findweb()
File "/home/ubuntu/ocssw/bin/seadasutils/anc_utils.py", line 666, in findweb
ancdatabase.insert_record(satfile=filekey, starttime=self.start, stoptime=self.stop, anctype=anctype,
File "/home/ubuntu/ocssw/bin/seadasutils/ancDB.py", line 103, in insert_record
c.execute('INSERT INTO ancfiles VALUES (NULL,?,?,?)', [ancfile, ancpath, anctype])
sqlite3.ProgrammingError: Error binding parameter 2: type 'PosixPath' is not supported
I remembered that "getanc" was easy to use before. I have not idea how to fix it, could someone provide some suggestions.
Seems there is a bug with the use of the -c,--curdir option. One I apparently introduced almost 3 years ago I'm very surprised this is the first report. The good news is the solution is simple.
The first option is a workaround. Don't use -c. Just let the code put the files in the default location.
The second option is to edit this file: $OCSSWROOT/bin/seadasutils/setupenv.py
replace line 55 which looks like this:
I was too quick with that 'fix'. It fixed getanc, but breaks modis_GEO and modis_L1B
My "fix" has been fixed The correct fix will be in the next OCSSW tag.