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

启动时protobuf 报错 #119

Open
TaChao opened this issue Jun 6, 2022 · 1 comment
Open

启动时protobuf 报错 #119

TaChao opened this issue Jun 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@TaChao
Copy link

TaChao commented Jun 6, 2022

bug描述
启动时protobuf 报错, 是否考虑升级protobuf 或者在pip包中指定protobuf版本

截屏

# eiseg                                                                                                                                                                                                                                   
Traceback (most recent call last):
  File "/Users/tachao/miniconda3/bin/eiseg", line 5, in <module>
    from eiseg.run import main
  File "/Users/tachao/miniconda3/lib/python3.9/site-packages/eiseg/run.py", line 25, in <module>
    from app import APP_EISeg  # 导入带槽的界面
  File "/Users/tachao/miniconda3/lib/python3.9/site-packages/eiseg/app.py", line 34, in <module>
    from controller import InteractiveController
  File "/Users/tachao/miniconda3/lib/python3.9/site-packages/eiseg/controller.py", line 23, in <module>
    import paddle
  File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/__init__.py", line 25, in <module>
    from .framework import monkey_patch_variable
  File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/framework/__init__.py", line 17, in <module>
    from . import random  # noqa: F401
  File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/framework/random.py", line 16, in <module>
    import paddle.fluid as fluid
  File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/fluid/__init__.py", line 36, in <module>
    from . import framework
  File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/fluid/framework.py", line 35, in <module>
    from .proto import framework_pb2
  File "/Users/tachao/miniconda3/lib/python3.9/site-packages/paddle/fluid/proto/framework_pb2.py", line 33, in <module>
    _descriptor.EnumValueDescriptor(
  File "/Users/tachao/miniconda3/lib/python3.9/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

运行环境(请尽量填写,这可以帮助我们定位问题):

  • 系统: [Mac os/Linux]
  • 安装方式:[pip]
  • 软件版本:[0.5.0]
@TaChao TaChao added the bug Something isn't working label Jun 6, 2022
@geoyee
Copy link
Member

geoyee commented Jul 1, 2022

试试升级protobuf看呢,我看了下我的环境中protobuf是3.20.0的,可以启动

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