Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n't find GeoStudio executables with the path provided. Please correct the path and redefine it with defineGeoStudioLauncher() method. #16

Open
colomber opened this issue Jul 8, 2024 · 4 comments

Comments

@colomber
Copy link

colomber commented Jul 8, 2024

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()
屏幕截图 2024-07-08 171418
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.

@MoiseRousseau
Copy link
Owner

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

@colomber
Copy link
Author

colomber commented Jul 9, 2024

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
pgs.defineGeoStudioLauncher("C:\Program Files\Seequent\GeoStudio 2023.1")
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 79, 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.
"
My Pycharm is in drive F and GeoStudio is in drive C. Will it matter?

@MoiseRousseau
Copy link
Owner

Sorry for the late answer. My time goes quickly during the summer :)
Do you succeed to launch GeoStudio from PyGeoStudio ? If not, you can manually edit the file GeoPath.py in your GeoStudio Python installation. I plan to change the way GeoCmd.exe is called in future version as there is many problems with it...

@ChengChen19
Copy link

when run the examples, there are some Error, like 'Traceback (most recent call last):
File "D:\geostudio\PyGeoStudio-main\examples\calibrations\rapid_drawdown_basic.py", line 62, in
initial_PWP = run_model(None,initial_guess_log) #Run model to get non-calibrated results
File "D:\geostudio\PyGeoStudio-main\examples\calibrations\rapid_drawdown_basic.py", line 53, in run_model
pgs.run(geofile, analyses_to_solve=[instant_drawdown])
File "C:\Users\kk\mambaforge\envs\geo\lib\site-packages\PyGeoStudio\utils.py", line 63, in run
raise RuntimeError(message)
RuntimeError: Call to GeoStudio ends up with no zero status code, which mean a failure of the simulation. Check GeoStudio output above for more detailed information.

Traceback (most recent call last):
File "D:\geostudio\PyGeoStudio-main\examples\parametric\rapid_drawdown_Ksat.py", line 44, in
pgs.run(geofile, analyses_to_solve=[instant_drawdown])
File "C:\Users\kk\mambaforge\envs\geo\lib\site-packages\PyGeoStudio\utils.py", line 63, in run
raise RuntimeError(message)
RuntimeError: Call to GeoStudio ends up with no zero status code, which mean a failure of the simulation. Check GeoStudio output above for more detailed information.
' why did the error happen?and how to solve this/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants