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

ModuleNotFoundError error when importing launch_sherlock from ansys.sherlock.core.launcher #465

Open
2 tasks done
EDCarman opened this issue Dec 6, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@EDCarman
Copy link

EDCarman commented Dec 6, 2024

🔍 Before submitting the issue

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

🐞 Description of the bug

Using the current dev version I get a ModuleNotFoundError when trying to import launch_sherlock.

📝 Steps to reproduce

Create a virtual environment and install the most recent commit using

pip install git+https://github.com/ansys/pysherlock.git@7ecba091ee34faa2ec4bb128d09f68a75e18b973

Launch Python and run this command:

from ansys.sherlock.core.launcher import launch_sherlock

Gives this error:

Traceback (most recent call last):
  File "C:\Temp\.venv\lib\site-packages\ansys\sherlock\core\model.py", line 11, in <module>
    import SherlockModelService_pb2
ModuleNotFoundError: No module named 'SherlockModelService_pb2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Temp\.venv\lib\site-packages\ansys\sherlock\core\launcher.py", line 16, in <module>
    from ansys.sherlock.core.sherlock import Sherlock
  File "C:\Temp\.venv\lib\site-packages\ansys\sherlock\core\sherlock.py", line 11, in <module>
    from ansys.sherlock.core.model import Model
  File "C:\Temp\.venv\lib\site-packages\ansys\sherlock\core\model.py", line 17, in <module>
    from SherlockModelService_pb2 import MeshType, TraceOutputType
ModuleNotFoundError: No module named 'SherlockModelService_pb2'

It works if you go two PRs back to this one:
https://github.com/ansys/pysherlock/tree/8dcc72780bf83d7a28aa888abd0c0a54fab33af3

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

2025 R1

🐍 Which Python version are you using?

3.10

📦 Installed packages

annotated-types==0.7.0
ansys-api-sherlock==0.1.35
ansys-sherlock-core @ git+https://github.com/ansys/pysherlock.git@7ecba091ee34faa2ec4bb128d09f68a75e18b973
grpcio==1.67.1
protobuf==5.29.1
pydantic==2.10.3
pydantic_core==2.27.1
typing_extensions==4.12.2
@EDCarman EDCarman added the bug Something isn't working label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant