I can not start Invest

when I start invest model , the module is shutdown after an error: ModuleNotFoundError: No module named ‘PySide’
Please see the attached file

Please help me.
Thank you

Thanks for letting us know about this! We’ll look into it.

In the meantime, could you try out InVEST 3.8.3 and see if that works for you? Here’s the download link: https://storage.googleapis.com/releases.naturalcapitalproject.org/invest/3.8.3/InVEST_3.8.3_x86_Setup.exe

Thank you for your reply,
I did try version 3.8.3 and 3.8.4. The same error occurs.
My laptop is Dell XPS l502 core 7, Ram 8GB; Windows 10 with ArcGIS 10.5 installed.
Please help and if you need other information, please let me know.
Thank you

OK well, my best guess is that there’s some configuration conflict between what the invest binaries expect and what is on your computer. I see from your prior post history that you’ve been able to run InVEST before, so we’re looking for something that would have changed in the relatively near future.

Just from the command-line output here (and thanks for the screenshot!), it looks like the invest binary is trying to load the wrong Qt binding. This can be forced via environment variables. Do you have a QT_API environment variable set? Are you able to run InVEST after setting an environment variable "QT_API" with the value "pyside2"?

Some other things to consider:

  • It looks like you are running the InVEST binaries, but do you also have a python environment (or conda environment) set up somewhere on your computer?
  • Have you changed any environment variables recently?

Let us know how this goes!
James

1 Like

It is very sorry that I did not read and response your help because of some private reasons.
I will try to find out the problems rely on your advice.
Thank you very much

Hi James,

The computer that got error with the invest model (version 3.8.2; 3.8.3; 3.8.4) as mentioned above has been broken. Currently, I am using another computer. ver3.8.2 is installed and working on this.
But I have just tried to install version 3.8.5 and 3.8.4, and got the same error as the following picture.

  • Yes, I installed python while installing ArcGIS desktop
  • No, I don’t change any environment variables.

In fact, The version 3.8.2 is working, the error appear with v384&v3.8.5 (I did not try with v3). In my laptop (the broken one), the error occurs on v3.8.2 also.

Because the version 3.8.2 is working on my computer, it is Ok with me for NOW. I just want to discuss to fix the problems.

Could you please help. Thank you.

PS.
I try to set a new variable "QT_API" with the value "pyside2" but the error is not changed.

Well, that is weird that 3.8.2 would work, but 3.8.4 and later would not! The differences between those two versions are minor, so offhand I’m not sure what’s going on, but thank you for being willing to help debug this! I hope we can get to the bottom of this issue and make sure that we fix the issue in a future version of InVEST.

Could you check a couple more things for me?

  1. What does your PYTHONPATH environment variable look like? Is this variable defined?
  2. If you create another user on your system, can you run InVEST when logged in as that user?
  3. Do you have any antivirus software running on your computer? Sometimes (pretty rarely) this can interfere with InVEST’s operation and cause unexpected errors.

Hm. I was so sure that the QT_API environment variable would fix that. Environment variables are only loaded into the terminal when cmd.exe is opened … would InVEST start after restarting the terminal app?

Thanks for your help debugging this!
James

Hi,

I dont found the variable name PYTHONPATH in my system

I tried to create a new user. But the same error occurs (v3.8.2 is working but failed with v3.8.4 and 3.8.5)

I dont have any antivirus program. I use the windows security default by windows 10.

After create QT_API variable, I have restarted windows and click to a Invest shortcut. The problems still there. I use cmd just for capture the screen.

Thank you for your help.
Ngô Đăng T

Thanks for your help and patience with debugging this @gis4sd!

OK, I’ve been digging into this and there’s definitely something very strange happening here: by the time InVEST has gotten to the point where it crashes with this error, it’s already found the library that it needs to find, but then it fails anyways!

Could you try another environment variable? Specifically, if you could add an environment variable FORCE_QT_API with a value of 1, and then restart cmd.exe and try re-running one of the versions of InVEST that won’t launch?

Thanks, and sorry about the delay on this!
James

Hi @gis4sd,

I’m really curious if the FORCE_QT_API environment variable setting I mentioned before will fix the issue (and please let me know if it does!), but once you’ve tried that, could you also try running this development build and see if it launches? This dev build contains a fix that might address it, but it’d be very helpful if you could verify whether it does.

https://storage.googleapis.com/natcap-dev-build-artifacts/invest/phargogh/3.8.6.post31+gaf49c804/InVEST_phargogh3.8.6.post31+gaf49c804_x86_Setup.exe

Thank you!
James

Hey everyone,
I joined the forum because I am starting to use InVEST, but I had exactly the same problem: it crashed everytime I opened. As other people did as well, I tried earlier versions but also couldnt run.

I’m here to let you know that installing by this link that @jdouglass posted really solved it, and I can run the models now.

Thanks a million!
Stella

1 Like

Great, thanks for letting us know @stellamanes! We’ll see about including this fix in our next version of InVEST.

@gis4sd I’d still love to hear if this works for you and/or if the FORCE_QT_API environment variable changes anything if and when you have a few minutes.

Thanks!
James

Hi,
Sorry for lately reply.
It is a pity that the program is still error as attached images
Thank you

x2scrap2

Ah, too bad that didn’t work. Thanks for trying it out! Have you had a chance to try out the development build I linked above? It worked for @stellamanes, so I’m hopeful that it’ll work for you as well. Here’s the download link again: https://storage.googleapis.com/natcap-dev-build-artifacts/invest/phargogh/3.8.6.post31+gaf49c804/InVEST_phargogh3.8.6.post31+gaf49c804_x86_Setup.exe

Thanks,
James

Hi James,
I have downloaded, installed and tested the version in your link. IT RUN.
Thank you

2 Likes

Great! Thanks for letting us know. We’ll be sure to include this fix in our next release of InVEST.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.