[ 
https://issues.apache.org/jira/browse/PHOENIX-6863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Istvan Toth updated PHOENIX-6863:
---------------------------------
    Description: 
On some systems we hit a protobuf bug which causes the following error when 
importing phoenixdb:
{noformat}
(env) [root@aglhue0124-1 ~]# python
Python 2.7.5 (default, Jul 13 2018, 13:06:57) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import phoenixdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/__init__.py",
 line 19, in <module>
    from phoenixdb import errors, types
  File 
"/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/types.py",
 line 21, in <module>
    from phoenixdb.avatica.proto import common_pb2
  File 
"/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/avatica/__init__.py",
 line 16, in <module>
    from .client import AvaticaClient  # noqa: F401
  File 
"/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/avatica/client.py",
 line 27, in <module>
    from phoenixdb.avatica.proto import common_pb2, requests_pb2, responses_pb2
  File 
"/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/avatica/proto/common_pb2.py",
 line 36, in <module>
    _STATEMENTTYPE = DESCRIPTOR.enum_types_by_name['StatementType']
AttributeError: 'NoneType' object has no attribute 'enum_types_by_name'
{noformat}
There are several error reports for this behvaiour with the new using the files 
generated by the new protoc with python2, but the fix is not available in a 
version that is compatible with Python2.

We don't see this error when running our dockerized test suite with Python2.

We need to understand the issue, and figure out a solution.

  was:On some systems we hit a protobuf bug which causes the following error 
when importing phoenixdb:


> PhoenixDB 1.2+ doesn't work with Python2 on some systems
> --------------------------------------------------------
>
>                 Key: PHOENIX-6863
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6863
>             Project: Phoenix
>          Issue Type: Bug
>          Components: python
>            Reporter: Istvan Toth
>            Assignee: Istvan Toth
>            Priority: Major
>
> On some systems we hit a protobuf bug which causes the following error when 
> importing phoenixdb:
> {noformat}
> (env) [root@aglhue0124-1 ~]# python
> Python 2.7.5 (default, Jul 13 2018, 13:06:57) 
> [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import phoenixdb
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File 
> "/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/__init__.py",
>  line 19, in <module>
>     from phoenixdb import errors, types
>   File 
> "/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/types.py",
>  line 21, in <module>
>     from phoenixdb.avatica.proto import common_pb2
>   File 
> "/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/avatica/__init__.py",
>  line 16, in <module>
>     from .client import AvaticaClient  # noqa: F401
>   File 
> "/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/avatica/client.py",
>  line 27, in <module>
>     from phoenixdb.avatica.proto import common_pb2, requests_pb2, 
> responses_pb2
>   File 
> "/opt/cloudera/parcels/CDH-7.2.17-1.cdh7.2.17.p0.36938352/lib/hue/build/env/lib/python2.7/site-packages/phoenixdb-1.2.1-py2.7.egg/phoenixdb/avatica/proto/common_pb2.py",
>  line 36, in <module>
>     _STATEMENTTYPE = DESCRIPTOR.enum_types_by_name['StatementType']
> AttributeError: 'NoneType' object has no attribute 'enum_types_by_name'
> {noformat}
> There are several error reports for this behvaiour with the new using the 
> files generated by the new protoc with python2, but the fix is not available 
> in a version that is compatible with Python2.
> We don't see this error when running our dockerized test suite with Python2.
> We need to understand the issue, and figure out a solution.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to