[
https://issues.apache.org/jira/browse/PHOENIX-6731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Istvan Toth updated PHOENIX-6731:
---------------------------------
Description:
While running the PQS test suite with protobuf 3.20+, I got the following error:
{noformat}
Traceback (most recent call last):
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/phoenix-queryserver-it/./src/it/bin/test_phoenixdb.py",
line 21, in <module>
import phoenixdb
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/__init__.py",
line 19, in <module>
from phoenixdb import errors, types
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/types.py",
line 21, in <module>
from phoenixdb.avatica.proto import common_pb2
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/avatica/__init__.py",
line 16, in <module>
from .client import AvaticaClient # noqa: F401
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/avatica/client.py",
line 27, in <module>
from phoenixdb.avatica.proto import common_pb2, requests_pb2, responses_pb2
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/avatica/proto/common_pb2.py",
line 47, in <module>
_descriptor.EnumValueDescriptor(
File
"/private/var/folders/vp/3bcljvzx1rl7cjrs_s7r4mp80000gp/T/tmp.SNangr0J/lib/python3.10/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{noformat}
The best course of action probably to re-generate the protobuf code as
suggested above.
was:
While running the PQS test suite on Python 3.19, I got the following error:
{noformat}
Traceback (most recent call last):
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/phoenix-queryserver-it/./src/it/bin/test_phoenixdb.py",
line 21, in <module>
import phoenixdb
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/__init__.py",
line 19, in <module>
from phoenixdb import errors, types
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/types.py",
line 21, in <module>
from phoenixdb.avatica.proto import common_pb2
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/avatica/__init__.py",
line 16, in <module>
from .client import AvaticaClient # noqa: F401
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/avatica/client.py",
line 27, in <module>
from phoenixdb.avatica.proto import common_pb2, requests_pb2, responses_pb2
File
"/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/avatica/proto/common_pb2.py",
line 47, in <module>
_descriptor.EnumValueDescriptor(
File
"/private/var/folders/vp/3bcljvzx1rl7cjrs_s7r4mp80000gp/T/tmp.SNangr0J/lib/python3.10/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{noformat}
The best course of action probably to re-generate the protobuf code as
suggested above.
Summary: PhoenixDB incompatible with protobuf 3.20+ (was: PhoenixDB
incompatible with Python 3.19+)
> PhoenixDB incompatible with protobuf 3.20+
> -------------------------------------------
>
> Key: PHOENIX-6731
> URL: https://issues.apache.org/jira/browse/PHOENIX-6731
> Project: Phoenix
> Issue Type: Bug
> Components: python, queryserver
> Affects Versions: queryserver-6.0.0
> Reporter: Istvan Toth
> Priority: Critical
>
> While running the PQS test suite with protobuf 3.20+, I got the following
> error:
> {noformat}
> Traceback (most recent call last):
> File
> "/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/phoenix-queryserver-it/./src/it/bin/test_phoenixdb.py",
> line 21, in <module>
> import phoenixdb
> File
> "/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/__init__.py",
> line 19, in <module>
> from phoenixdb import errors, types
> File
> "/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/types.py",
> line 21, in <module>
> from phoenixdb.avatica.proto import common_pb2
> File
> "/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/avatica/__init__.py",
> line 16, in <module>
> from .client import AvaticaClient # noqa: F401
> File
> "/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/avatica/client.py",
> line 27, in <module>
> from phoenixdb.avatica.proto import common_pb2, requests_pb2,
> responses_pb2
> File
> "/Users/stoty/workspaces/apache-phoenix/phoenix-queryserver-parent/python-phoenixdb/phoenixdb/avatica/proto/common_pb2.py",
> line 47, in <module>
> _descriptor.EnumValueDescriptor(
> File
> "/private/var/folders/vp/3bcljvzx1rl7cjrs_s7r4mp80000gp/T/tmp.SNangr0J/lib/python3.10/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{noformat}
> The best course of action probably to re-generate the protobuf code as
> suggested above.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)