Deltares/QGIS-Tim

compute button not working

Closed this issue · 3 comments

The server won't start with the following error:
image

I'm on ubuntu 22.04 with QGIS 3.28 and the latest version of the QGIS-TIM plugin (I think).

Fix in server_handler.py, separate the arguments in the call to subprocess.Popen (see below) or perhaps add shell=True to the command:

        self.process = subprocess.Popen(
            [f"{interpreter}", "-u", "-m", "gistim", "serve"],
            stdin=subprocess.PIPE,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            env=env_vars[interpreter],
            text=True,  
        )

We are encoutering a similar issue on Win10 with QGIS 3.28 and the latest plugin:

image

Huite commented

I think your reason might be different than Davíd's, because I think his his issue was specific to Ubuntu (and probably linux in general).

You could check %APPDATA%\qgis-tim\.

There should be two JSON files there, which tell the plugin where to find the Python interpreter and what environmental variables to use.

If the directory doesn't exist or is empty, you should (re-)run python gistim -m configure which will generate the JSON files.

Thanks, we solved the problem with your suggestions!

Both JSON files existed in the given folder. We had to change the first entry of both JSON files (which pointed to a personal folder) to the following string; C:\\ProgramData\\deltaforge\\python.exe