ansys / pysherlock

Pythonic interface to Sherlock
https://sherlock.docs.pyansys.com
MIT License
7 stars 0 forks source link

sherlock.launch_sherlock(single_project_path="<destination>") is not setting the correct single project path #316

Open aklara-ansys opened 3 months ago

aklara-ansys commented 3 months ago

🔍 Before submitting the issue

🐞 Description of the bug

from ansys.sherlock.core import launcher launcher.launch_sherlock(single_project_path="C:\users\aklara\Downloads\test")

No matter what folder is specified using "single_project_path", all imported and added project are created at the location projectDialog_projDir in the Sherlock %APPDATA% user.properties file, which is not updated by this launch of Sherlock.

📝 Steps to reproduce

from ansys.sherlock.core import launcher launcher.launch_sherlock(single_project_path="C:\users\\Downloads\test") After Sherlock is opened, import or add a project. See that the location of the project is in projectDialog_projDir but that value was not updated to the path I specified above using launch Sherlock. All projects I created went to C:\users\tbreg\Documents\Sherlock, which was the value of projectDialog_projDir in my %APPDATA%/Sherlock/user.properties projectDialog_projDir

As you can see, my "single_project_path" destination is empty: wrongSingleProjectPath

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

25.1 11:06:01.352 INFO: Version 2025 R1 (25.1b20240611), build 20240611.1

🐍 Which Python version are you using?

3.10

📦 Installed packages

annotated-types==0.7.0
ansys-additive-core==0.18.0b5
ansys-api-additive==1.7.2
ansys-api-platform-instancemanagement==1.0.0
ansys-api-sherlock==0.1.27
ansys-platform-instancemanagement==1.1.2
ansys-sherlock-core==0.6.0
bleach==6.1.0
bokeh==3.3.4
Brotli==1.1.0
cachetools==5.3.2
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
clr-loader==0.2.6
colorama==0.4.6
comtypes==1.3.1
contourpy==1.2.0
cycler==0.12.1
dill==0.3.8
fonttools==4.48.1
google-api-core==2.17.1
google-api-python-client==2.118.0
google-auth==2.27.0
google-auth-httplib2==0.2.0
googleapis-common-protos==1.62.0
grpcio==1.60.0
grpcio-health-checking==1.48.2
grpcio-tools==1.60.0
httplib2==0.22.0
idna==3.6
importlib-metadata==7.0.1
inflate64==1.0.0
Jinja2==3.1.3
keyboard==0.13.5
kiwisolver==1.4.5
linkify-it-py==2.0.3
Markdown==3.5.2
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.8.2
mdit-py-plugins==0.4.0
mdurl==0.1.2
multivolumefile==0.2.3
numpy==1.25.0
numpy-stl==3.1.1
packaging==23.2
pandas==2.1.4
panel==1.3.8
param==2.0.2
pillow==10.2.0
platformdirs==4.2.0
plotly==5.18.0
proto-plus==1.23.0
protobuf==3.20.3
psutil==5.9.7
py7zr==0.20.8
pyasn1==0.5.1
pyasn1-modules==0.3.0
PyAutoIt==0.6.5
pybcj==1.0.2
pycparser==2.21
pycryptodomex==3.19.1
pydantic==2.7.3
pydantic_core==2.18.4
pyparsing==3.1.1
pyppmd==1.1.0
python-dateutil==2.8.2
python-utils==3.8.2
pythonnet==3.0.3
pytz==2023.3.post1
pyviz_comms==3.0.1
pywin32==306
pywinauto==0.6.8
PyYAML==6.0.1
pyzstd==0.15.9
requests==2.31.0
rsa==4.9
scipy==1.12.0
selenium==3.141.0
six==1.16.0
tenacity==8.2.3
texttable==1.7.0
tornado==6.4
tqdm==4.66.2
typing_extensions==4.10.0
tzdata==2023.4
uc-micro-py==1.0.3
uritemplate==4.1.1
urllib3==1.26.16
vtk==9.3.0
webencodings==0.5.1
xyzservices==2023.10.1
zipp==3.17.0
aklara-ansys commented 1 month ago

Also want to add that it appears to not be launching in single project mode, even with seemingly the correct parameters ['C:\WB_INSTALL\v251\sherlock\SherlockClient.exe', '-grpcPort=9092', '-singleProject "C:\ARM_Reports\IMPORT_PROJECT_ZIP_ARCHIVE_SINGLE_MODE_PYSHLEROCK"']

ERROR - project - import_project_zip_archive_single_mode - Import zipped project archive error: This API call can only be used when Sherlock application is in single project mode.