Jump to content
Geochemist's Workbench Support Forum
Helge

Problem with Python Plugin

Recommended Posts

Hello everybody,

I have a problem getting started with the GWB Python plugin. On running the example script I get:

###############################
Y:\THEREDA\Arbeitsergebnisse\Testrechnungen\meinGWB>GWBplugin_Python_example2.py
Starting program SpecE8
Traceback (most recent call last):
  File "Y:\THEREDA\Arbeitsergebnisse\Testrechnungen\meinGWB\GWBplugin_Python_example2.py", line 20, in <module>
    -s \"c:/program files/gwb/gtdata/feoh.dat\""):
  File "Y:\THEREDA\Arbeitsergebnisse\Testrechnungen\meinGWB\GWBplugin.py", line 11, in initialize
    return cdll.gwbplugin.c_initialize(byref(self.plugin), c_char_p(app_name), c_char_p(file_name), c_char_p(cmds))
  File "C:\Python27-x64\lib\ctypes\__init__.py", line 436, in __getattr__
    dll = self._dlltype(name)
  File "C:\Python27-x64\lib\ctypes\__init__.py", line 366, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] Das angegebene Modul wurde nicht gefunden
###############################

I get the same result with Python 3.7.x and also when calling module react (in a different script). To me it appears that GWB is having trouble with my Python installation. The requested file C:\Python27-x64\lib\ctypes\__init__.py exists. I use GWB 12 Professional.

Thanks for help.

Helge

 

 

Share this post


Link to post
Share on other sites

Hi Helge,

It looks like you need to add the GWB install folder to your PATH environment variable so that Python can find the GWB libraries.

 

If working from the Windows command pane you can set the PATH as follows:

set PATH=C:\Program Files\GWB;%PATH%

If you have GWB installed somewhere else you will need to adjust the command to match.

 

Please note that that will only set the PATH for that command pane window. To permanently set PATH you can hit the Windows key + s to bring up Windows search or just click the Windows button and start typing in "environment".  You should then get an option for changing account environment variables. You can then add or update the PATH variable for your user account.

Hope this helps,

Dan

Share this post


Link to post
Share on other sites

Perfect! Thank you very much 🙂

Helge

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...