OTB 7.0.0 CreateApplication problem

Hi,

Thanks to the expertise of my colleague I managed to install OTB 7.0.0 on my new Fedora 31. (The installation guide deserves an update)

Now I am able to call the ‘otbApplication’ module from my python3 environment which is perfect.
Trying to apply the first line of the introductory example however I came to have an error :

import otbApplication as otb

Let’s create the application with codename “Smoothing”

app = otb.Registry.CreateApplication(“Smoothing”)

Python does not give an error however in the variable explorer of Spyder it says that ‘app’ is a NonType object of builtins modul

I appreciate any comment on this
With regards,
Sina

OK I came up with some solution in case it will be interesting for others :
in my case the otb path to the ‘otbApplication.py’ is:

/home/sina/Installs/lib/otb/python/

but the application files are in:

/home/sina/Installs/lib/otb/applications/

when I tried to manually add these two addresses to PYTHONPATH manager of Spyder IDE the first path address works properly and I can import the ‘otbApplication’ module however for the list of the available application to be reachable I did:

otb.Registry.SetApplicationPath("/home/sina/Installs/lib/otb/applications/")

and now the list of otb applications is reachable.

Hello,

You can also set the OTB_APPLICATION_PATH env variable to “/home/sina/Installs/lib/otb/applications/”

Cédric

1 Like