Cosmo CSK error Stripmap AttributeError: 'NoneType' object has no attribute 'lower'

Added by francesco menniti 2 months ago

HI!developers!
thanks for the work done!

I'm trying insar processing with the different satellites. Now I'm trying with Cosmo .h5 data and I came across an error that I can't overcome! could someone help me out?

I'm trying to process Cosmoskymed images with stackStripmap and then use STAMPS.
I started processing from .h5 images and I have used unpackFrame_CSK to convert them to SLC.

Afterwards when I run the stackStripMap.py -s /root/elaborazone/slc_output -d ....... demLat*.dem.wgs84 -t 250 -b 600 -x '....' --nofocus -z

I get this error

['20190626', '20190712', '20190728', '20190813', '20190829', '20190930', '20191117', '20191203', '20200205', '20200221', '20200324', '20200511', '20200612']
Traceback (most recent call last):
File "/root/isce2/contrib/stack/stripmapStack/stackStripMap.py", line 363, in <module>
main()
File "/root/isce2/contrib/stack/stripmapStack/stackStripMap.py", line 333, in main
if inps.sensor.lower() == 'uavsar_stack': # don't try to calculate baselines for UAVSAR_STACK data
AttributeError: 'NoneType' object has no attribute 'lower'

can you kindly help me to solve this problem?
Thanks a lot!


Replies (5)

RE: Cosmo CSK error Stripmap AttributeError: 'NoneType' object has no attribute 'lower' - Added by Piyush Agram 2 months ago

The error is self explanatory. For some reason there is a hardcoded check for UAVSAR, give the setup line a sensor argument that is not equal to UAVSAR_STACK. Since you didnt provide one, it is set to None and it is trying to compare strings with it

RE: Cosmo CSK error Stripmap AttributeError: 'NoneType' object has no attribute 'lower' - Added by francesco menniti 2 months ago

thank you for quick reply Piyush Agram!
now works!
I used stackStripMap.py -s /root/elaborazone/slc_output -d ....... demLat*.dem.wgs84 -t 250 -b 600 -x '....' --nofocus -z -a 1 -r 1 -S'CSK'

I entered -S 'CSK' because it didn't work without it. I know that cosmo is not a defined sensor.

however, after processing, I noticed that in the merged/slc folder the files for each date weigh only 80 kb. In fact the .slc .vrt .full files are missing etc .. with the exception of a single folder containing master immage .hdr .slc .vrt data and the foldersMasterShelve and slaaveShelve.

do you have any idea how i could solve it?

thank you so much.

RE: Cosmo CSK error Stripmap AttributeError: 'NoneType' object has no attribute 'lower' - Added by francesco menniti 2 months ago

I just realized that there is a error in step 6

root/ELABORAZIONE_ASC/SLC_OUTPUT3/refineSlaveTiming/pairs/20200511_20200612
['_MutableMapping__marker', '__abstractmethods__', '__class__', '__contains__', '__del__', '__delattr__', '__delitem__', '__dict__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__setattr__', '__setitem__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '__weakref__', '_abc_cache', '_abc_negative_cache', '_abc_negative_cache_version', '_abc_registry', '_protocol', 'cache', 'clear', 'close', 'dict', 'get', 'items', 'keyencoding', 'keys', 'pop', 'popitem', 'setdefault', 'sync', 'update', 'values', 'writeback']
Traceback (most recent call last):
File "/root/isce2/contrib/stack/stripmapStack/invertMisreg.py", line 207, in <module>
main()
File "/root/isce2/contrib/stack/stripmapStack/invertMisreg.py", line 147, in main
A, B, Laz, Lrg = design_matrix(pairDirs)
File "/root/isce2/contrib/stack/stripmapStack/invertMisreg.py", line 124, in design_matrix
azOff, rgOff = extract_offset(pairDirs[ni])
File "/root/isce2/contrib/stack/stripmapStack/invertMisreg.py", line 74, in extract_offset
return azCoefs.flatten(0), rgCoefs.flatten(0)
ValueError: Non-string object detected for the array ordering. Please pass in 'C', 'F', 'A', or 'K' instead

do you have any idea how i could solve it?

RE: Cosmo CSK error Stripmap AttributeError: 'NoneType' object has no attribute 'lower' - Added by Joaquin Escayo 2 months ago

Hi there again Fracesco!

I also had this problem with Envisat. Take a look to this thread: http://earthdef.caltech.edu/boards/4/topics/3305?r=3309#message-3309

Quoting HY Chen:

and follow your work, In ./run_files/run_6_invertMisreg, I fixed invertMisreg.py in line74 : return azCoefs.flatten(order = 'C'), rgCoefs.flatten(order = 'C')

That should fix your problem. However you may encounter "azpoly" errors, check the logs for step 6.

Hope it helps

Joaquin

RE: Cosmo CSK error Stripmap AttributeError: 'NoneType' object has no attribute 'lower' - Added by francesco menniti 2 months ago

thank you so much! now works!!

Can I also ask what are the objects C ',' F ',' A ', or' K '?

FM

(1-5/5)