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

Python pyproject.toml does not generate the protobufs #51

Open
cyberkaida opened this issue May 15, 2024 · 2 comments
Open

Python pyproject.toml does not generate the protobufs #51

cyberkaida opened this issue May 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@cyberkaida
Copy link
Owner

(env) D:\github\reverse-engineering-assistant\reverse-engineering-assistant>reva-chat
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "c:\users\-\.local\bin\reva-chat.exe\__main__.py", line 4, in <module>
  File "C:\Users\-\pipx\venvs\reverse-engineering-assistant\Lib\site-packages\reverse_engineering_assistant\chat_client.py", line 22, in <module>
    from .protocol.RevaChat_pb2_grpc import RevaChatServiceStub
ModuleNotFoundError: No module named 'reverse_engineering_assistant.protocol'

sys.path.append(str(Path(__file__).parent.joinpath('protocol')))
import grpc
from .protocol.RevaChat_pb2_grpc import RevaChatServiceStub
from .protocol.RevaChat_pb2 import RevaChatMessage, RevaChatMessageResponse

@cyberkaida
Copy link
Owner Author

Is there a better way than this hack to make the protobuf generated code import?

@cyberkaida cyberkaida added the bug Something isn't working label May 15, 2024
@cyberkaida
Copy link
Owner Author

Probably did not run the makefile

Unfortunately the pyproject.toml does not trigger the protobuf build like the gradle does in Java.

@cyberkaida cyberkaida changed the title Protobuf module fails to import on Windows Python pyproject.toml does not generate the protobufs May 15, 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