Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

TypeError: is_valid_executable_path() missing 1 required positional argument: 'exe_loc' #53

@samigithub2022

Description

@samigithub2022

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

TypeError: is_valid_executable_path() missing 1 required positional argument: 'exe_loc'

while using the save_mechanical_path from pymechanical package.

📝 Steps to reproduce

  1. install ansys-mechanical-core package
pip install ansys-mechanical-core
  1. then run this code:
from ansys.mechanical.core.mechanical import save_mechanical_path

exe_path = r"C:\Program Files\ANSYS Inc\v232\aisol\bin\winx64\AnsysWBU.exe"

save_mechanical_path(exe_path)
  1. You will get the following error:
CRITICAL -  -  logging - handle_exception - Uncaught exception
Traceback (most recent call last):
  File "C:\Test\path_error.py", line 5, in <module>
    save_mechanical_path(exe_path)
  File "C:\Test\pymechanical_venv\lib\site-packages\ansys\mechanical\core\mechanical.py", line 235, in save_mechanical_path
    return atp.save_mechanical_path(exe_loc)
  File "C:\Test\pymechanical_venv\lib\site-packages\ansys\tools\path\path.py", line 545, in save_mechanical_path
    return _save_path("mechanical", exe_loc, allow_prompt)
  File "C:\Test\pymechanical_venv\lib\site-packages\ansys\tools\path\path.py", line 487, in _save_path
    _check_uncommon_executable_path(product, exe_loc)
  File "C:\Test\pymechanical_venv\lib\site-packages\ansys\tools\path\path.py", line 608, in _check_uncommon_executable_path
    if not _is_common_executable_path(product, exe_loc):
  File "C:\Test\pymechanical_venv\lib\site-packages\ansys\tools\path\path.py", line 386, in _is_common_executable_path
    is_valid_path = is_valid_executable_path(exe_loc)
TypeError: is_valid_executable_path() missing 1 required positional argument: 'exe_loc'

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

ansys-mechanical-core==0.9.0

🐍 Which Python version are you using?

3.11

📦 Installed packages

ansys-api-mechanical==0.1.0
ansys-api-platform-instancemanagement==1.0.0b3
ansys-mechanical-core==0.9.0
ansys-platform-instancemanagement==1.1.1
ansys-pythonnet==3.1.0rc1
ansys-tools-path==0.2.4
appdirs==1.4.4
cffi==1.15.1
clr-loader==0.2.5
colorama==0.4.6
googleapis-common-protos==1.59.1
grpcio==1.54.2
importlib-metadata==6.6.0
protobuf==3.20.3
protoc-gen-swagger==0.1.0
pycparser==2.21
tqdm==4.65.0
zipp==3.15.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions