I’ve got what seems to be a simple but frustrating error using snappy within python scripts (Python 3.4.5).
I have a script called process_with_snappy.py that contains a number of functions that use snappy- if I run my script directly, everything is fine - operations like:
run through and my files write out correctly. Seems to be the same if I run everything from a Python console.
However, when I run another script that imports the functions from process_with_snappy.py, snappy errors on import.
‘from snappy import ProductIO’ throws up 'ImportError: cannot import name ‘ProductIO’’ etc.
If I import snappy instead, this seems to work, but as soon as I try and call something, for example:
snappy.GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis() I get the error: AttributeError: module ‘snappy’ has no attribute ‘GPF’
Does anyone know what might be going on here?