Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Hiero: protobuf TypeError #3715

Closed
jeangjenq opened this issue Aug 23, 2022 · 2 comments · Fixed by #3717
Closed

Hiero: protobuf TypeError #3715

jeangjenq opened this issue Aug 23, 2022 · 2 comments · Fixed by #3717

Comments

@jeangjenq
Copy link

jeangjenq commented Aug 23, 2022

Describe the bug
3.12.0 to 3.14.0 updated protobuf from 3.19.4 to 4.21.5 caused TypeError when launching NukeStudio.

File "C:\OpenPype\.venv\lib\site-packages\google\protobuf\descriptor.py", line 755, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade from 3.12.0 to 3.14.0
  2. Launch NukeStudio from Launcher.
  3. Get NukeStudio init.py error pops up. Scrolls down on NukeStudio console to see the error above.

Expected behavior
NukeStudio launch without errror.

Screenshot
MicrosoftTeams-image

Desktop (please complete the following information):

  • OS: Windows 10 Pro 21H2
  • Host: NukeStudio

Additional context
Setting environment variable
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
like the error recommended helps. But as it suggests python parsing will be much slower.

[cuID:2rjv1aw]

@BigRoy
Copy link
Collaborator

BigRoy commented Aug 24, 2022

But as it suggests python parsing will be much slower.

Is this an effect you notice in day to day usage in Nuke? I am not sure where it's used whether it'd be an urgent issue or not.

@iLLiCiTiT
Copy link
Member

Full traceback:

Traceback (most recent call last):
  File "C:/Program Files/Nuke13.0v1/plugins/init.py", line 27, in <module>
    import nukescripts.ViewerProcess
  File "C:/Program Files/Nuke13.0v1/plugins\nukescripts\__init__.py", line 55, in <module>
    from .renderdialog import *
  File "C:/Program Files/Nuke13.0v1/plugins\nukescripts\renderdialog.py", line 15, in <module>
    from .fnFlipbookRenderer import getFlipbookRenderer
  File "C:/Program Files/Nuke13.0v1/plugins\nukescripts\fnFlipbookRenderer.py", line 4, in <module>
    from foundry.frameserver.nuke.bases import RenderQueueObserverMixin
  File "C:\Program Files\Nuke13.0v1\pythonextensions\site-packages\foundry\frameserver\__init__.py", line 31, in <module>
    from . import broker
  File "C:\Program Files\Nuke13.0v1\pythonextensions\site-packages\foundry\frameserver\broker.py", line 17, in <module>
    from foundry.frameserver import message
  File "C:\Program Files\Nuke13.0v1\pythonextensions\site-packages\foundry\frameserver\message\__init__.py", line 8, in <module>
    from MessageHeader_pb2 import MessageHeader
  File "C:\Program Files\Nuke13.0v1\pythonextensions\site-packages\foundry\frameserver\message\MessageHeader_pb2.py", line 37, in <module>
    type=None),
  File "C:\openpype3_1\.venv\lib\site-packages\google\protobuf\descriptor.py", line 755, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants