Protobuf TypeError: Descriptors cannot not be created directly.
まだ誰も着手していません。
評価
調査の方向性
agri_data/tests/imperviousness/test_views.py の失敗を再現し、その後 vector_tile_base/vector_tile_pb2.py とパッケージの protobuf/protoc 互換性を調査します。テストを再実行し、VectorTile が descriptor の TypeError なしに import できることを確認して、選択した互換性パスを検証します。
索引モデルが issue の本文から書いたものです。
説明
agri_data/tests/imperviousness/test_views.py:5: in <module>
from vector_tile_base import VectorTile
/usr/local/lib/python3.9/site-packages/vector_tile_base/__init__.py:1: in <module>
from . import engine
/usr/local/lib/python3.9/site-packages/vector_tile_base/engine.py:3: in <module>
from . import vector_tile_pb2
/usr/local/lib/python3.9/site-packages/vector_tile_base/vector_tile_pb2.py:33: in <module>
_descriptor.EnumValueDescriptor(
/usr/local/lib/python3.9/site-packages/google/protobuf/descriptor.py:755: in __new__
_message.Message._CheckCalledFromGeneratedFile()
E TypeError: Descriptors cannot not be created directly.
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.
E If you cannot immediately regenerate your protos, some other possible workarounds are:
E 1. Downgrade the protobuf package to 3.20.x or lower.
E 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E
E More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
The protobuf changelog says the following:
We made some changes in Python language support in Protocol Buffers. Version 4.21.0 is a new major version, following 3.20.1. The new version is based on the upb library, and offers significantly better parsing performance than previous releases, especially for large payloads.
[...]
- Python upb requires generated code that has been generated from protoc 3.19.0 or newer.
- 主要言語
- Python
- スター
- 57
- フォーク
- 17
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mapbox/vector-tile-base のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
mapbox/vector-tile-base#25 · コメント 1 件 ·
-
`_points_equal` incorrectly compares floats with `is not`対応中かも @SashaMIT が 11 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 45/100
mapbox/vector-tile-base#19 · コメント 1 件 ·
-
Make a PyPI packageオープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
mapbox/vector-tile-base#18 · コメント 1 件 · リアクション 9 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
mapbox/vector-tile-base#10 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
mapbox/vector-tile-base#9 · コメント 1 件 ·
mapbox/vector-tile-base の issue をすべて見る
似ている issue
-
first
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AcademySoftwareFoundation/rmtc#54 · コメント 1 件 ·
-
feature/cohorts feature/feature-flags team/feature-flags
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
License examples/ as MIT対応中かも @PGrayCS が今日担当しました。 オープンdocumentation enhancement example good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
speedyk-005/yasbd-lib#383 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
interactions-py/interactions.py#1827 ·
-
Managed start can fail when OpenVMM reads its control capability before NVX writes it対応中かも @ppenna が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信