Discussion:
[otb-users] DLL load fails
Hendrik Bernert
2018-07-16 12:37:47 UTC
Permalink
Hi there,

I have the same problem as described (but not solved) here
<https://groups.google.com/forum/#!searchin/otb-users/import|sort:date/otb-users/DtHrZgyzbGI/omwJyg5bCgAJ>.
I can run the GUI and python obviously can locate the path to
otbApplciation.py, but I get this error message:

Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 21,
in <module>
_otbApplication = swig_import_helper()
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 20,
in swig_import_helper
return importlib.import_module('_otbApplication')
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.

I tried everything, from removing and setting all the environment variables
as described in the post or listed in the otbenv.bat to restarting the
computer for the changes to take place, but nothing worked. Is there
anything I'm missing? Where do I have to point to the dll's, which for me
are located here:

c:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\bin\

I'm running on a machine with Windows 10, 64bit, have the OTB installed
with 64bit and Python 2.7 with 64bit architecture (yes, I'm sure about
that). I also have GDAL installed under

C:\Program Files\GDAL\

Any help is much appreciated, thanks in advance!
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Manuel Grizonnet
2018-07-31 12:34:30 UTC
Permalink
Hi,

I don't have a Windows 10 platform to try to reproduce the issue. Does any
otb developers with a Windows machine can try to reproduce the issue?

@Hendrick: in a terminal can you execute otbenv.bat and then output the
value of the environment PYTHONPATH and send us the value you've got
(command: echo %PYTHONPATH%)
?

Thanks in advance.
Post by Hendrik Bernert
Hi there,
I have the same problem as described (but not solved) here
<https://groups.google.com/forum/#!searchin/otb-users/import%7Csort:date/otb-users/DtHrZgyzbGI/omwJyg5bCgAJ>.
I can run the GUI and python obviously can locate the path to
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\
otbApplication.py", line 21, in <module>
_otbApplication = swig_import_helper()
File "C:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\
otbApplication.py", line 20, in swig_import_helper
return importlib.import_module('_otbApplication')
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden
.
I tried everything, from removing and setting all the environment
variables as described in the post or listed in the otbenv.bat to
restarting the computer for the changes to take place, but nothing worked.
Is there anything I'm missing? Where do I have to point to the dll's, which
c:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\bin\
I'm running on a machine with Windows 10, 64bit, have the OTB installed
with 64bit and Python 2.7 with 64bit architecture (yes, I'm sure about
that). I also have GDAL installed under
C:\Program Files\GDAL\
Any help is much appreciated, thanks in advance!
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Manuel Grizonnet
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rashad
2018-08-06 07:43:52 UTC
Permalink
Post by Manuel Grizonnet
Hi,
I don't have a Windows 10 platform to try to reproduce the issue. Does any
otb developers with a Windows machine can try to reproduce the issue?
@Hendrick: in a terminal can you execute otbenv.bat and then output the
value of the environment PYTHONPATH and send us the value you've got
(command: echo %PYTHONPATH%)
?
probably a conflict of python version : C:\Program Files\JetBrains\PyCharm
Community Edition 2018.1.3

we should avoid setting pythonpath in env or even _otbApplication.so from
packages.
Post by Manuel Grizonnet
Thanks in advance.
Post by Hendrik Bernert
Hi there,
I have the same problem as described (but not solved) here
<https://groups.google.com/forum/#!searchin/otb-users/import%7Csort:date/otb-users/DtHrZgyzbGI/omwJyg5bCgAJ>.
I can run the GUI and python obviously can locate the path to
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 21
, in <module>
_otbApplication = swig_import_helper()
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 20
, in swig_import_helper
return importlib.import_module('_otbApplication')
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.
I tried everything, from removing and setting all the environment
variables as described in the post or listed in the otbenv.bat to
restarting the computer for the changes to take place, but nothing worked.
Is there anything I'm missing? Where do I have to point to the dll's, which
c:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\bin\
I'm running on a machine with Windows 10, 64bit, have the OTB installed
with 64bit and Python 2.7 with 64bit architecture (yes, I'm sure about
that). I also have GDAL installed under
C:\Program Files\GDAL\
Any help is much appreciated, thanks in advance!
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
You received this message because you are subscribed to the Google
Groups "otb-users" group.
<javascript:>
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Manuel Grizonnet
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hendrik Bernert
2018-07-31 13:03:56 UTC
Permalink
Sure, here is the output (as expected, I think):
$ echo %PYTHONPATH%
$ C:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python;
Post by Hendrik Bernert
Hi there,
I have the same problem as described (but not solved) here
<https://groups.google.com/forum/#!searchin/otb-users/import%7Csort:date/otb-users/DtHrZgyzbGI/omwJyg5bCgAJ>.
I can run the GUI and python obviously can locate the path to
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 21,
in <module>
_otbApplication = swig_import_helper()
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 20,
in swig_import_helper
return importlib.import_module('_otbApplication')
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden
.
I tried everything, from removing and setting all the environment
variables as described in the post or listed in the otbenv.bat to
restarting the computer for the changes to take place, but nothing worked.
Is there anything I'm missing? Where do I have to point to the dll's, which
c:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\bin\
I'm running on a machine with Windows 10, 64bit, have the OTB installed
with 64bit and Python 2.7 with 64bit architecture (yes, I'm sure about
that). I also have GDAL installed under
C:\Program Files\GDAL\
Any help is much appreciated, thanks in advance!
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hendrik Bernert
2018-08-10 16:18:17 UTC
Permalink
Shall I then delete the otb-path from the PYTHONPATH variable?
Post by Hendrik Bernert
Hi there,
I have the same problem as described (but not solved) here
<https://groups.google.com/forum/#!searchin/otb-users/import%7Csort:date/otb-users/DtHrZgyzbGI/omwJyg5bCgAJ>.
I can run the GUI and python obviously can locate the path to
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 21,
in <module>
_otbApplication = swig_import_helper()
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 20,
in swig_import_helper
return importlib.import_module('_otbApplication')
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden
.
I tried everything, from removing and setting all the environment
variables as described in the post or listed in the otbenv.bat to
restarting the computer for the changes to take place, but nothing worked.
Is there anything I'm missing? Where do I have to point to the dll's, which
c:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\bin\
I'm running on a machine with Windows 10, 64bit, have the OTB installed
with 64bit and Python 2.7 with 64bit architecture (yes, I'm sure about
that). I also have GDAL installed under
C:\Program Files\GDAL\
Any help is much appreciated, thanks in advance!
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rashad
2018-08-13 08:07:59 UTC
Permalink
Post by Hendrik Bernert
Shall I then delete the otb-path from the PYTHONPATH variable?
Actually I don't know if that would work for you. issue is python binaries
in OTB are compatible with only specific versions of OTB. If luckly, your
system may have one and all works as planned.
you can change the order or setting PYTHONPATH. i.e first set other
pythonpath and then OTB python bindings.

Here is the current situation in otbnenv.bat
https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/blob/develop/Packaging/Files/otbenv.bat#L26

set PYTHONPATH=%CURRENT_SCRIPT_DIR%lib\python;%PYTHONPATH%
change this to:
set PYTHONPATH=%PYTHONPATH%;%CURRENT_SCRIPT_DIR%lib\python

That might work.

Another option is to avoid otb python bindings. you can call otbcli_APP
directly which gives same thing.
roll a simple python class that can create application and call subprocess
under the hood

class otbApplication(object):
def __init__(self, name):
pass
def Execute(self):
subprocess.call(["otbcli_" + self.name, ''.join(parameter_list)])

app = otbApplication("TrainImagesClassifier")
app.Execute()

The above snippet is to give an idea to skip python bindings and directly
use cli in a pythonic way. It does all the same dll loading stuff but you
avoid errors such as above.
One minor issue is that you have to give up chaining apps which I don't
think is too much to leave
Post by Hendrik Bernert
Post by Hendrik Bernert
Hi there,
I have the same problem as described (but not solved) here
<https://groups.google.com/forum/#!searchin/otb-users/import%7Csort:date/otb-users/DtHrZgyzbGI/omwJyg5bCgAJ>.
I can run the GUI and python obviously can locate the path to
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 21
, in <module>
_otbApplication = swig_import_helper()
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 20
, in swig_import_helper
return importlib.import_module('_otbApplication')
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.
I tried everything, from removing and setting all the environment
variables as described in the post or listed in the otbenv.bat to
restarting the computer for the changes to take place, but nothing worked.
Is there anything I'm missing? Where do I have to point to the dll's, which
c:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\bin\
I'm running on a machine with Windows 10, 64bit, have the OTB installed
with 64bit and Python 2.7 with 64bit architecture (yes, I'm sure about
that). I also have GDAL installed under
C:\Program Files\GDAL\
Any help is much appreciated, thanks in advance!
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hendrik Bernert
2018-08-13 14:21:26 UTC
Permalink
Thanks for your efforts! I'll give it a shot and report back once I had
time to test it.
Post by Hendrik Bernert
Hi there,
I have the same problem as described (but not solved) here
<https://groups.google.com/forum/#!searchin/otb-users/import%7Csort:date/otb-users/DtHrZgyzbGI/omwJyg5bCgAJ>.
I can run the GUI and python obviously can locate the path to
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 21,
in <module>
_otbApplication = swig_import_helper()
File "C:\Program
Files\OrfeoToolbox\OTB-6.6.0-Win64\lib\python\otbApplication.py", line 20,
in swig_import_helper
return importlib.import_module('_otbApplication')
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Program Files\JetBrains\PyCharm Community Edition
2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in
do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden
.
I tried everything, from removing and setting all the environment
variables as described in the post or listed in the otbenv.bat to
restarting the computer for the changes to take place, but nothing worked.
Is there anything I'm missing? Where do I have to point to the dll's, which
c:\Program Files\OrfeoToolbox\OTB-6.6.0-Win64\bin\
I'm running on a machine with Windows 10, 64bit, have the OTB installed
with 64bit and Python 2.7 with 64bit architecture (yes, I'm sure about
that). I also have GDAL installed under
C:\Program Files\GDAL\
Any help is much appreciated, thanks in advance!
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...