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

Can't find GeoStudio executables with the path provided. #15

Open
alexandrevitor opened this issue Jul 1, 2024 · 3 comments
Open

Can't find GeoStudio executables with the path provided. #15

alexandrevitor opened this issue Jul 1, 2024 · 3 comments

Comments

@alexandrevitor
Copy link

Hi Moise,

First of all, thank you so much for your effort in creating this library. I've been searching for something like this for quite a while. However, I am currently experiencing some issues with importing the library.

As a newcomer to coding, this might be a simple mistake on my part, but I would greatly appreciate your help in resolving it. Here's my situation:

I am a trainee at a geotechnical company in Brazil, and I'm trying to automate our workflow with the GeoStudio software. The challenge I'm facing is that I don't have admin permissions on the machine where GeoStudio is installed (I'm not sure if this affects anything).

Our GeoStudio licenses are for the 2007 version, and the path to GeoStudio.exe is "C:\Program Files (x86)\GEO-SLOPE\GeoStudio2007\Bin", as shown in the attached image. However, when I run the following code:

import PyGeoStudio as pgs pgs.defineGeoStudioLauncher("C:\\Program Files (x86)\\GEO-SLOPE\\GeoStudio2007\\Bin") exit()

I get the following error:

PS C:\Alexandre Vitor\01 - Programacao\03 - Trabalho\00 - GERAL\GEOSTUDIO\Converter CAD para GeoStudio\Scripts Teste> & C:/Users/alexandre.morais/AppData/Local/Microsoft/WindowsApps/python3.11.exe "c:/Alexandre Vitor/01 - Programacao/03 - Trabalho/00 - GERAL/GEOSTUDIO/Converter CAD para GeoStudio/Scripts Teste/teste_com_weight.py"
Traceback (most recent call last):
File "C:\Users\alexandre.morais\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PyGeoStudio\utils.py", line 72, in testLauncher
output = subprocess.run(cmd, check=False, stdout=subprocess.PIPE).stdout.decode()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\Alexandre Vitor\01 - Programacao\03 - Trabalho\00 - GERAL\GEOSTUDIO\Converter CAD para GeoStudio\Scripts Teste\teste_com_weight.py", line 2, in
pgs.defineGeoStudioLauncher("C:\Program Files (x86)\GEO-SLOPE\GeoStudio2007\Bin")
File "C:\Users\alexandre.morais\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\PyGeoStudio\utils.py", line 35, in defineGeoStudioLauncher
testLauncher(s)
File "C:\Users\alexandre.morais\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\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 (x86)\GEO-SLOPE\GeoStudio2007\Bin") but still get the same error.

I can't figure out why this error arises since, as far as I can tell, the path I am using is correct and leads to the GeoStudio.exe installation.

image
image

Any help in this matter would be greatly appreciated!

Thanks again for your work and patience.

Best regards,
Alexandre

@MoiseRousseau
Copy link
Owner

Hi Alexandre,
PyGeoStudio search for an executable called GeoCmd.exe, which is not in your installation. Note PyGeoStudio was designed for GeoStudio version 2022 and above. It might works with previous version, but GeoStudio 2007 seems too old to be supported. Do you have access to a newer version of GeoStudio ?

@alexandrevitor
Copy link
Author

Hi Moisse!

Thank you for your response. Unfortunately, I don't have access to the latest versions of GeoStudio, as the licenses are purchased by the heads of my department.

I will try to request them to update our licenses, but I think it's unlikely to work, haha.

Given this situation, it seems I won't be able to work with this library using the old version of GeoStudio, right?

In any case, I really appreciate your response and congratulate you on the creation of the library.

Wishing you all the best.

Alexandre

@MoiseRousseau
Copy link
Owner

Hi @alexandrevitor ,
Did you get a new licence for GeoStudio ?
This library was not design for the old version of GeoStudio, and I did not have the time to support it. Therefore, this is little chance this library will work...
Moise

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

2 participants