Open colomber opened 3 weeks ago
PyGeoStudio search for GeoCmd.exe, not GeoStudio.exe. However, you don't have to bother with the exe, you just have to enter the path to GeoStudio global installation. In your case: "C:\Program Files\Seequent\GeoStudio 2023.1\". See also: https://pygeostudio.readthedocs.io/en/stable/install.html#make-pygeostudio-recognize-geostudio
I did it,but , the code still couldn't run.
I get the following error:
"
Traceback (most recent call last):
File "F:\Pycharm\pycharm\pythonProject\slope\test.py", line 3, in
Hi,MoiseRousseau Our GeoStudio licenses are for the 2023.1 version, and the path to GeoStudio.exe is "C:\Program Files\Seequent\GeoStudio 2023.1\Bin\GeoStudio.exe", as shown in the attached image. However, when I run the following code: import PyGeoStudio as pgs pgs.defineGeoStudioLauncher("C:\Program Files\Seequent\GeoStudio 2023.1\Bin\GeoStudio.exe") exit() I get the following error: Traceback (most recent call last): File "F:\Pycharm\pycharm\pythonProject\slope.venv\lib\site-packages\PyGeoStudio\utils.py", line 72, in testLauncher output = subprocess.run(cmd, check=False, stdout=subprocess.PIPE).stdout.decode() File "F:\Pycharm\PYTHON\lib\subprocess.py", line 503, in run with Popen(*popenargs, **kwargs) as process: File "F:\Pycharm\PYTHON\lib\subprocess.py", line 971, in init self._execute_child(args, executable, preexec_fn, close_fds, File "F:\Pycharm\PYTHON\lib\subprocess.py", line 1456, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "F:\Pycharm\pycharm\pythonProject\slope\test.py", line 3, in
pgs.defineGeoStudioLauncher("C:\Program Files\Seequent\GeoStudio 2023.1\Bin\GeoStudio.exe")
File "F:\Pycharm\pycharm\pythonProject\slope.venv\lib\site-packages\PyGeoStudio\utils.py", line 35, in defineGeoStudioLauncher
testLauncher(s)
File "F:\Pycharm\pycharm\pythonProject\slope.venv\lib\site-packages\PyGeoStudio\utils.py", line 74, in testLauncher
raise ValueError(error_message)
ValueError: Can't find GeoStudio executables with the path provided. Please correct the path and redefine it with defineGeoStudioLauncher() method.
I have also tried using pgs.defineGeoStudioLauncher(r"C:\Program Files\Seequent\GeoStudio 2023.1\Bin\GeoStudio.exe") but still get the same error.
I also have an executable called GeoCmd.exe.