Script works differently with python 3.8 and 3.10
rs-bh-n opened this issue ยท 2 comments
๐ Before submitting the issue
- I have searched among the existing issues
- I am using a Python virtual environment
๐ Description of the bug
Attached zip file . (a) "01.py" is a Trace import script that runs fine with standalone 241 Mechanical on console or when passed on as script in batch mode (b) "02.py" is an equivalent pymech file that runs fine with 3.8 but not 3.10
๐ Steps to reproduce
-
Standalone Mechanical - Gui Mode : runs fine
a. Open standalone Mechanical 241 .
b. Paste the script from 01_mech_script.py in the scripting console. -
Standalone Mechanical - Batch Mode : runs fine
a. Terminal>Activate venv
b. launch standalone mechanical (pymech_test)
D:\S\dec_bug_test> ansys-mechanical -r 241 -i D:\S\dec_bug_test*01_mech_script.py* -
PyMechanical
a. Terminal > Activate venv
b. D:\S\dec_bug_test> python .*02_pymech.py*
c. runs into this error
This is with Python 3.10.
However step3 with Python 3.8 works fine (i.e., trace import happens fine)
๐ป Which operating system are you using?
Windows
๐ Which ANSYS version are you using?
Ansys Mechanical 241
๐ Which Python version are you using?
3.10
๐ฆ Installed packages
Package Version
------------------------------------- --------
ansys-api-mechanical 0.1.1
ansys-api-platform-instancemanagement 1.0.0
ansys-mechanical-core 0.10.4
ansys-platform-instancemanagement 1.1.2
ansys-pythonnet 3.1.0rc3
ansys-tools-path 0.4.0
appdirs 1.4.4
cffi 1.16.0
click 8.1.7
clr-loader 0.2.6
colorama 0.4.6
grpcio 1.60.0
importlib-metadata 7.0.0
pip 21.1.1
platformdirs 4.1.0
protobuf 3.20.3
pycparser 2.21
setuptools 56.0.0
tqdm 4.66.1
zipp 3.17.0
38_310.zip
The Files are here.