Open
Description
Usage fails with BetterProto 2.0.0b4 Version
$ buf generate -vvv proto
E0105 15:39:19.511094 1771702 template.go:991] created a body with 0 properties in the message, this might be unintended: name:"ModifyTileDisplayStateRequest" field:{name:"tile_name" number:1 label:LABEL_OPTIONAL type:TYPE_STRING json_name:"tileName"} field:{name:"tile_state" number:2 label:LABEL_OPTIONAL type:TYPE_ENUM type_name:".reco.services.v1.TileDisplayState" json_name:"tileState"}
Traceback (most recent call last):
File "/usr/local/bin/protoc-gen-python_betterproto", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/betterproto/plugin/main.py", line 32, in main
response = generate_code(request)
File "/usr/local/lib/python3.9/dist-packages/betterproto/plugin/parser.py", line 107, in generate_code
read_protobuf_service(service, index, output_package)
File "/usr/local/lib/python3.9/dist-packages/betterproto/plugin/parser.py", line 191, in read_protobuf_service
ServiceMethodCompiler(
File "<string>", line 7, in __init__
File "/usr/local/lib/python3.9/dist-packages/betterproto/plugin/models.py", line 683, in __post_init__
self.mutable_default_args # ensure this is called before rendering
File "/usr/local/lib/python3.9/dist-packages/betterproto/plugin/models.py", line 720, in mutable_default_args
and f.default_value_string != "None"
File "/usr/local/lib/python3.9/dist-packages/betterproto/plugin/models.py", line 486, in default_value_string
enum = next(
StopIteration
Failure: failed to generate plugins concurrently: failed to execute plugins concurrently: failed to generate: exit status 1.
Replacing to older version
$ pip install betterproto[compiler]==2.0.0b3
Collecting betterproto[compiler]==2.0.0b3
Downloading betterproto-2.0.0b3-py3-none-any.whl (59 kB)
|████████████████████████████████| 59 kB 611 kB/s
Installing collected packages: betterproto
Attempting uninstall: betterproto
Found existing installation: betterproto 2.0.0b4
Uninstalling betterproto-2.0.0b4:
Successfully uninstalled betterproto-2.0.0b4
Successfully installed betterproto-2.0.0b3
Usage succeed with BetterProto 2.0.0b3 Version
$ buf generate -vvv proto
E0105 15:54:45.424446 1781827 template.go:991] created a body with 0 properties in the message, this might be unintended:
Writing __init__.py
Writing google/__init__.py
Writing google/api/__init__.py
Writing google/longrunning/__init__.py
Writing google/rpc/__init__.py
Writing grpc/__init__.py
Writing grpc/gateway/__init__.py
Writing grpc/gateway/protoc_gen_openapiv2/__init__.py
Writing grpc/gateway/protoc_gen_openapiv2/options/__init__.py
Writing validate/__init__.py