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

Cannot import python opencue module from source #1302

Open
Tilix4 opened this issue Jun 29, 2023 · 2 comments
Open

Cannot import python opencue module from source #1302

Tilix4 opened this issue Jun 29, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Tilix4
Copy link

Tilix4 commented Jun 29, 2023

Describe the bug
When trying to install pycue and pyoutline from source, at import time, it fails with this message:

Python 3.9.14 (main, Mar 30 2023, 18:04:09) 
[GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import opencue
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/felix/Documents/Dev/OpenCue/pycue/opencue/__init__.py", line 24, in <module>
    from .cuebot import Cuebot
  File "/home/felix/Documents/Dev/OpenCue/pycue/opencue/cuebot.py", line 34, in <module>
    from opencue.compiled_proto import comment_pb2_grpc
  File "/home/felix/Documents/Dev/OpenCue/pycue/opencue/compiled_proto/comment_pb2_grpc.py", line 5, in <module>
    import comment_pb2 as comment__pb2
ModuleNotFoundError: No module named 'comment_pb2'

To Reproduce
Steps to reproduce the behavior:

  1. Follow https://www.opencue.io/docs/getting-started/installing-pycue-and-pyoutline/#option-2-installing-from-source
  2. Follow https://www.opencue.io/docs/getting-started/installing-pycue-and-pyoutline/#configuring-and-verifying-the-install

Expected behavior
The import succeeds

Version Number
v0.21.13

Additional context
Ubuntu 22.04

@Tilix4 Tilix4 added the bug Something isn't working label Jun 29, 2023
@silviamichele
Copy link

Hello, I'm experiencing a similar issue, but in my case, the 'pycue/compiled_proto/' folder doesn't contain the 'comment_pb2_grpc.py' file. I find there's a discussion #763 than solve in your case. Have resolved your problem? If so, could you please share the solution?

@Tilix4
Copy link
Author

Tilix4 commented Nov 10, 2023

Hi, the answer came up from the mailing list: https://lists.aswf.io/g/opencue-user/message/679

Long story short: you must run 2to3 -wn -f import rqd/rqd/compiled_proto/*_pb2*.py

I'll close this issue when proper documentation will be written.

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

2 participants