ola icon indicating copy to clipboard operation
ola copied to clipboard

Python bindings broken due to use of depricated protobuf APIs

Open Noir- opened this issue 7 months ago • 0 comments

The current Python bindings use one or more deprecated APIs from google.protobuf.

from ola.OlaClient import OlaClient
  File "/opt/homebrew/opt/ola/libexec/lib/python3.13/site-packages/ola/OlaClient.py", line 23, in <module>
    from ola.rpc.SimpleRpcController import SimpleRpcController
  File "/opt/homebrew/opt/ola/libexec/lib/python3.13/site-packages/ola/rpc/SimpleRpcController.py", line 18, in <module>
    from google.protobuf import service
ImportError: cannot import name 'service' from 'google.protobuf' (/Users/noir/projects/light/ola/ola-0.10.8/pybuild/lib/python3.13/site-packages/google/protobuf/__init__.py)

This was deprecated in the beginning of 2025. I believe the latest compatible version is 5.29.3. (Quick fix is installing the lib with pip install protobuf==5.29.3) Please consider to switch to the latest protobuf APIs.

Noir- avatar May 22 '25 12:05 Noir-