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

Issue while installing dependencies (mac os 12.3.1, Blender 2.9.3) #50

Closed
inqtel opened this issue May 28, 2022 · 4 comments
Closed

Issue while installing dependencies (mac os 12.3.1, Blender 2.9.3) #50

inqtel opened this issue May 28, 2022 · 4 comments

Comments

@inqtel
Copy link

inqtel commented May 28, 2022

I get the following error message when trying to get the add on to install dependencies. I have mediapipe etc already installed. Per the instructions, I opened blender in admin mode through sudo command in terminal. Watching the progress there, it looked like finding/installing modules wasn't actually the issue, the error seems to come afterwards?

I'd love to get this add on working!!

Read prefs: /var/root/Library/Application Support/Blender/2.93/config/userpref.blend
BlendArMocap-release - Initializing...
PACKAGE: BlendArMocap-release
binary: /Applications/Blender.app/Contents/MacOS/Blender
blender version: (2, 93, 9) exe: /Applications/Blender.app/Contents/Resources/2.93/python/bin/python3.9
BlendArMocap-release - Dependencies installed: False
Registing BlendArMocap

Try to access dependencies
Dependency(module='mediapipe', package=None, name=None)
Exception in module register(): /var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/init.py
Traceback (most recent call last):
File "/Applications/Blender.app/Contents/Resources/2.93/scripts/modules/addon_utils.py", line 386, in enable
mod.register()
File "/var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/init.py", line 45, in register
ui_registration.register()
File "/var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/src/cgt_blender/interface/ui_registration.py", line 40, in register
install_dependencies.import_module(module_name=dependency.module, global_name=dependency.name)
File "/var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/src/cgt_blender/utils/install_dependencies.py", line 54, in import_module
globals()[global_name] = importlib.import_module(global_name)
File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/init.py", line 17, in
import mediapipe.python.solutions as solutions
File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/python/solutions/init.py", line 17, in
import mediapipe.python.solutions.drawing_styles
File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/python/solutions/drawing_styles.py", line 20, in
from mediapipe.python.solutions.drawing_utils import DrawingSpec
File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/python/solutions/drawing_utils.py", line 25, in
from mediapipe.framework.formats import detection_pb2
File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/framework/formats/detection_pb2.py", line 14, in
from mediapipe.framework.formats import location_data_pb2 as mediapipe_dot_framework_dot_formats_dot_location__data__pb2
File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/framework/formats/location_data_pb2.py", line 14, in
from mediapipe.framework.formats.annotation import rasterization_pb2 as mediapipe_dot_framework_dot_formats_dot_annotation_dot_rasterization__pb2
File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/framework/formats/annotation/rasterization_pb2.py", line 36, in
_descriptor.FieldDescriptor(
File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 560, 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

@haker1023
Copy link

Error message in last 5 lines are same with me when I first enable addon option block each time

@cgtinker
Copy link
Owner

Are you using the intel version of blender? (There's a silicone and a intel version downloaded at blender.org)

It seems like there is an issue with the mediapipe module. First make sure you are using the intel version. Secondly I'd try to delete the mediapipe module in the site packages and reinstall it. I'll try to reproduce this error soon.

@inqtel
Copy link
Author

inqtel commented Jun 1, 2022

Yes it's the intel version (it's this file, and the platform–support.txt file in library/application support reads “{Intel Inc./Intel(R) HD Graphics 6000/4.1 INTEL-18.5.8}=SUPPORTED”).

I've deleted mediapipe from the site packages folder contained within blender's package contents, and then reinstalled the BlendarMoCap addon (BlendArMocap-release-v141.zip). As before, terminal shows the modules installing, and "Installation process finished" is displayed. Then the traceback error.

Thanks for looking into this!

Python: Traceback (most recent call last):
  File "/var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/src/cgt_blender/interface/ui_preferences.py", line 29, in execute
    install_dependencies.install_and_import_module(module_name=dependency.module,
  File "/var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/src/cgt_blender/utils/install_dependencies.py", line 94, in install_and_import_module
    import_module(module_name, global_name)
  File "/var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/src/cgt_blender/utils/install_dependencies.py", line 54, in import_module
    globals()[global_name] = importlib.import_module(global_name)
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/__init__.py", line 17, in <module>
    import mediapipe.python.solutions as solutions
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/python/solutions/__init__.py", line 17, in <module>
    import mediapipe.python.solutions.drawing_styles
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/python/solutions/drawing_styles.py", line 20, in <module>
    from mediapipe.python.solutions.drawing_utils import DrawingSpec
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/python/solutions/drawing_utils.py", line 25, in <module>
    from mediapipe.framework.formats import detection_pb2
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/framework/formats/detection_pb2.py", line 14, in <module>
    from mediapipe.framework.formats import location_data_pb2 as mediapipe_dot_framework_dot_formats_dot_location__data__pb2
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/framework/formats/location_data_pb2.py", line 14, in <module>
    from mediapipe.framework.formats.annotation import rasterization_pb2 as mediapipe_dot_framework_dot_formats_dot_annotation_dot_rasterization__pb2
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/framework/formats/annotation/rasterization_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 560, 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

location: <unknown location>:-1
Error: Python: Traceback (most recent call last):
  File "/var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/src/cgt_blender/interface/ui_preferences.py", line 29, in execute
    install_dependencies.install_and_import_module(module_name=dependency.module,
  File "/var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/src/cgt_blender/utils/install_dependencies.py", line 94, in install_and_import_module
    import_module(module_name, global_name)
  File "/var/root/Library/Application Support/Blender/2.93/scripts/addons/BlendArMocap-release/src/cgt_blender/utils/install_dependencies.py", line 54, in import_module
    globals()[global_name] = importlib.import_module(global_name)
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/__init__.py", line 17, in <module>
    import mediapipe.python.solutions as solutions
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/python/solutions/__init__.py", line 17, in <module>
    import mediapipe.python.solutions.drawing_styles
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/python/solutions/drawing_styles.py", line 20, in <module>
    from mediapipe.python.solutions.drawing_utils import DrawingSpec
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/python/solutions/drawing_utils.py", line 25, in <module>
    from mediapipe.framework.formats import detection_pb2
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/framework/formats/detection_pb2.py", line 14, in <module>
    from mediapipe.framework.formats import location_data_pb2 as mediapipe_dot_framework_dot_formats_dot_location__data__pb2
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/framework/formats/location_data_pb2.py", line 14, in <module>
    from mediapipe.framework.formats.annotation import rasterization_pb2 as mediapipe_dot_framework_dot_formats_dot_annotation_dot_rasterization__pb2
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/mediapipe/framework/formats/annotation/rasterization_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "/Applications/Blender.app/Contents/Resources/2.93/python/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 560, 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

location: <unknown location>:-1

@cgtinker
Copy link
Owner

cgtinker commented Jun 2, 2022

Google recently updated their protobuffers and mediapipe didn't include the change in their dependencies. I've been working on a fix but only tested on windows so far - https://github.com/cgtinker/BlendArMocap/tree/development.

Please try the development build and refer to #56

@cgtinker cgtinker closed this as completed Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants