tilezen / mapbox-vector-tile

Python package for encoding & decoding Mapbox Vector Tiles
MIT License
240 stars 47 forks source link

latest protobuf 4.21 break mapbox-vertor-tile #113

Closed vincentsarago closed 1 year ago

vincentsarago commented 2 years ago

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

ref: https://github.com/developmentseed/timvt/runs/6803647280?check_suite_focus=true#step:8:33

/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/google/protobuf/descriptor.py:755: in __new__
[30](https://github.com/developmentseed/timvt/runs/6803647280?check_suite_focus=true#step:8:31)
    _message.Message._CheckCalledFromGeneratedFile()
[31](https://github.com/developmentseed/timvt/runs/6803647280?check_suite_focus=true#step:8:32)
E   TypeError: Descriptors cannot not be created directly.
[32](https://github.com/developmentseed/timvt/runs/6803647280?check_suite_focus=true#step:8:33)
E   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.
[33](https://github.com/developmentseed/timvt/runs/6803647280?check_suite_focus=true#step:8:34)
E   If you cannot immediately regenerate your protos, some other possible workarounds are:
[34](https://github.com/developmentseed/timvt/runs/6803647280?check_suite_focus=true#step:8:35)
E    1. Downgrade the protobuf package to 3.20.x or lower.
[35](https://github.com/developmentseed/timvt/runs/6803647280?check_suite_focus=true#step:8:36)
E    2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
[36](https://github.com/developmentseed/timvt/runs/6803647280?check_suite_focus=true#step:8:37)
E

Solutions:

benoit9126 commented 2 years ago

@vincentsarago A proposal to solve this and much more in #114

vincentsarago commented 1 year ago

I think it was solved in #119