Skip to content

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

@alexandrevitor

Description

@alexandrevitor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions