Workbench does not run after startup

new post:

Hi James I’m a newbie to the software and needed to check my windows 10 install as I can’t seem to get it running. version 3.14.1. I have downloaded and installed the software but it doesn’t run after start up.

@frederick , I moved your post to a new topic since it’s likely to get lost if attached to a two-year old thread.

Can you describe in any more detail what happens? I assume you click the “InVEST 3.14.1 Workbench” link from your start menu…and then what happens?

Could you look at the Windows Task Manager when you do this to see if the Workbench appears in the “Apps” list?

Also, please check if you have any files in this folder and upload them here:
C:\Users\<your username>\AppData\Roaming\invest-workbench\logs

Thank you,

Hi there, thanks for the reply seems to be working now.

Hey Dave I seem to still be having trouble running the workbench. any advise? Maybe I spoke too soon.

Please follow the advice I posted in my first response.

[13:54:38.366] [C:\Users\User\AppData\Local\Programs\InVEST 3.14.1 Workbench\resources\app.asar\build\main\main.js] FetchError: request to http://127.0.0.1:56789/api/ready failed, reason: connect ECONNREFUSED 127.0.0.1:56789
at ClientRequest. (C:\Users\User\AppData\Local\Programs\InVEST 3.14.1 Workbench\resources\app.asar\node_modules\node-fetch\lib\index.js:1505:11)
at ClientRequest.emit (node:events:513:28)
at Socket.socketErrorListener (node:_http_client:502:9)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Hi Dave have attached sample log previews of what’s going on with the software

Thanks, it would be most helpful if you could upload the whole file for all files you find in,
C:\Users\<your username>\AppData\Roaming\invest-workbench\logs

Use the “upload” button when replying here to attach the files. If you tried that previously and it didn’t work, I have adjusted some settings here so hopefully it will work if you try again. Thanks.

In addition, I would exit the Workbench and then check your Windows Task Manager to see if there are any processes still running called,

“InVEST 3.14.1 Workbench”
“invest-workbench”
“invest.exe”

Force quit or “End Task” any that you find. Then try starting the Workbench again.

Thank you,

Thank you Dave here’s what’s there.

main.log (203.2 KB)

Hi @frederick , thanks for sharing your logfile. Sorry I haven’t been able to respond earlier.

From the log, it appears that most of the time the Workbench does not startup correctly, but that maybe it has started correctly once or twice?

One of the startup operations is taking much longer than expected and it ultimately times out. I’m not sure what is causing that. We might try changing a few things and sending you a new version to try, though that might take a few more days.

In the meantime, if you feel like trying something, you could do the following:

  1. Make sure the Workbench is closed
  2. Open the “Command Prompt” program on Windows
  3. Copy/Paste this command and press enter:
"C:\Users\User\AppData\Local\Programs\InVEST 3.14.1 Workbench\resources\invest\invest.exe" serve --port 56789
  1. Wait for a message like this to appear in the command prompt (I’m curious how long this takes if you try it):
 * Serving Flask app 'natcap.invest.ui_server'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:56789
Press CTRL+C to quit
  1. Open the Workbench, try running a model
  2. When you are done and after you have closed the Workbench, you will need to go back to that Command Prompt window and press CTRL+C to exit that invest server program. Or you can leave it running.

Thanks again for reporting this problem. It is certainly something we would like to resolve.

thanks dave got it working. stellar stuff.

Great to hear! Did you have to wait long for that “Serving Flask app” message to appear after entering the command in the terminal? That’s the step that seems like it takes way too long during the Workbench startup, based on your logfile.

not that I remember. I haven’t shut the command prompt yet but if it’s likely I’ll have to run the command again
. Ill keep a look out.

Hi @dave,
I tried running the command "C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\InVEST 3.14.2 Workbench.exe" serve --port 56789 on my laptop because I was having trouble starting the Workbench. However, I encountered the following errors:

[C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\app.asar\build\main\main.js] Windows detected, requesting single instance lock
[09:20:42.010] [C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\app.asar\build\main\main.js] Running invest-workbench version 3.14.2
[09:20:43.051] [C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\app.asar\build\main\main.js] Found invest binaries “C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\invest\invest.exe” for version
[09:20:43.062] [C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\app.asar\build\main\main.js] Started python process as PID 936
[09:20:43.381] [C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\app.asar\build\main\main.js] retry # 1
[09:20:43.696] [C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\app.asar\build\main\main.js] retry # 2
[09:20:44.012] [C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\app.asar\build\main\main.js] retry # 3
[09:20:44.300] [C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\app.asar\build\main\main.js] Traceback (most recent call last):
File “invest\cli.py”, line 16, in
File “PyInstaller\loader\pyimod02_importers.py”, line 419, in exec_module
File “natcap\invest\datastack.py”, line 37, in
File “PyInstaller\loader\pyimod02_importers.py”, line 419, in exec_module
File “natcap\invest\utils.py”, line 16, in
File “PyInstaller\loader\pyimod02_importers.py”, line 419, in exec_module
File “pygeoprocessing_init_.py”, line 15, in
File “PyInstaller\loader\pyimod02_importers.py”, line 419, in exec_module
File “pygeoprocessing\geoprocessing.py”, line 30, in
File “PyInstaller\loader\pyimod02_importers.py”, line 419, in exec_module
File “osgeo\gdal_array.py”, line 10, in
ImportError: DLL load failed while importing _gdal_array: The specified procedure could not be found.
[7796] Failed to execute script ‘cli’ due to unhandled exception!

Do you have any suggestions on how I can resolve this issue?

Thanks,
Lingling

related error messages:
Traceback (most recent call last):
File “C:\Users\liu02034\miniforge3\envs\invest\Lib\site-packages\osgeo_init_.py”, line 30, in swig_import_helper
return importlib.import_module(mname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\liu02034\miniforge3\envs\invest\Lib\importlib_init_.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1204, in _gcd_import
File “”, line 1176, in _find_and_load
File “”, line 1147, in find_and_load_unlocked
File “”, line 676, in load_unlocked
File “”, line 573, in module_from_spec
File “”, line 1233, in create_module
File “”, line 241, in call_with_frames_removed
ImportError: DLL load failed while importing gdal: The specified procedure could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “d:\Shared drives\NatCapTEEMs\Projects\WB_MANAGE_Project\ES\Onil\POLLINATION\execuate_pollination_IND.py”, line 1, in
import natcap.invest.pollination
File “C:\Users\liu02034\miniforge3\envs\invest\Lib\site-packages\natcap\invest\pollination.py”, line 11, in
import pygeoprocessing
File "C:\Users\liu02034\miniforge3\envs\invest\Lib\site-packages\pygeoprocessing_init
.py", line 15, in
from . import geoprocessing
File “C:\Users\liu02034\miniforge3\envs\invest\Lib\site-packages\pygeoprocessing\geoprocessing.py”, line 29, in
from osgeo import gdal
File "C:\Users\liu02034\miniforge3\envs\invest\Lib\site-packages\osgeo_init
.py", line 46, in
gdal = swig_import_helper()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\liu02034\miniforge3\envs\invest\Lib\site-packages\osgeo_init
.py", line 42, in swig_import_helper
raise ImportError(traceback_string + ‘\n’ + msg)
ImportError: Traceback (most recent call last):
File "C:\Users\liu02034\miniforge3\envs\invest\Lib\site-packages\osgeo_init
.py", line 30, in swig_import_helper
return importlib.import_module(mname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\liu02034\miniforge3\envs\invest\Lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1204, in _gcd_import
File “”, line 1176, in _find_and_load
File “”, line 1147, in _find_and_load_unlocked
File “”, line 676, in _load_unlocked
File “”, line 573, in module_from_spec
File “”, line 1233, in create_module
File “”, line 241, in _call_with_frames_removed
ImportError: DLL load failed while importing _gdal: The specified procedure could not be found.
On Windows, with Python >= 3.8, DLLs are no longer imported from the PATH.
If gdalXXX.dll is in the PATH, then set the USE_PATH_FOR_GDAL_PYTHON=YES environment variable
to feed the PATH into os.add_dll_directory().

I have the following conda environments in my laptop:

  • base: C:\Users\liu02034\AppData\Local\anaconda3
  • env2024: C:\Users\liu02034\AppData\Local\anaconda3\envs\env2024
  • base: C:\Users\liu02034\miniforge3
  • env_Hackathon: C:\Users\liu02034\miniforge3\envs\env_Hackathon
  • env_MANAGE: C:\Users\liu02034\miniforge3\envs\env_MANAGE
  • env_kids: C:\Users\liu02034\miniforge3\envs\env_kids
  • invest: C:\Users\liu02034\miniforge3\envs\invest

I deleted the first two environments and installed InVEST using the following command:
pip install “git+https://github.com/natcap/invest.git@main#egg=natcap.invest”

I can run InVEST in a development environment, but I’m still unable to open the InVEST Workbench. Any suggestions on how to fix this issue would be greatly appreciated!

@lingling could you confirm how you are trying to start the workbench? Are you using the start menu link, or are you trying to run the workbench from the command line?

Did the workbench stop working all of a sudden, or has this been happening for some time?

Do you have any values set to the PYTHONPATH environment variable?

I tried both methods:

  1. From the Start Menu: The InVEST logo appeared, but the Workbench did not show up.
  2. From the command line: I followed Dave’s previous post with the command:

Copy code

"C:\Users\liu02034\AppData\Local\Programs\InVEST 3.14.2 Workbench\resources\invest\invest.exe" serve --port 56789

However, I encountered the following error:

Copy code

Traceback (most recent call last):
  File "invest\cli.py", line 16, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "natcap\invest\datastack.py", line 37, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "natcap\invest\utils.py", line 16, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "pygeoprocessing\__init__.py", line 15, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "pygeoprocessing\geoprocessing.py", line 30, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
  File "osgeo\gdal_array.py", line 10, in <module>
ImportError: DLL load failed while importing _gdal_array: The specified procedure could not be found.
[29820] Failed to execute script 'cli' due to an unhandled exception!

Any advice on how to fix this?