You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Juntao Hu (Jira)" <ji...@apache.org> on 2023/02/09 02:53:00 UTC

[jira] [Created] (FLINK-30969) Pyflink table example throws "module 'pandas' has no attribute 'Int8Dtype'"

Juntao Hu created FLINK-30969:
---------------------------------

             Summary: Pyflink table example throws "module 'pandas' has no attribute 'Int8Dtype'"
                 Key: FLINK-30969
                 URL: https://issues.apache.org/jira/browse/FLINK-30969
             Project: Flink
          Issue Type: Bug
          Components: API / Python
    Affects Versions: 1.17.0
            Reporter: Juntao Hu
             Fix For: 1.17.0, 1.18.0


After apache-beam is upgraded to 2.43.0 in 1.17, running `python pyflink/examples/table/basic_operations.py` will throw error:
{code:java}
Traceback (most recent call last):
  File "pyflink/examples/table/basic_operations.py", line 484, in <module>
    basic_operations()
  File "pyflink/examples/table/basic_operations.py", line 29, in basic_operations
    t_env = TableEnvironment.create(EnvironmentSettings.in_streaming_mode())
  File "/Users/vancior/Documents/Github/flink-back/flink-python/pyflink/table/table_environment.py", line 121, in create
    return TableEnvironment(j_tenv)
  File "/Users/vancior/Documents/Github/flink-back/flink-python/pyflink/table/table_environment.py", line 100, in __init__
    self._open()
  File "/Users/vancior/Documents/Github/flink-back/flink-python/pyflink/table/table_environment.py", line 1640, in _open
    startup_loopback_server()
  File "/Users/vancior/Documents/Github/flink-back/flink-python/pyflink/table/table_environment.py", line 1631, in startup_loopback_server
    from pyflink.fn_execution.beam.beam_worker_pool_service import \
  File "/Users/vancior/Documents/Github/flink-back/flink-python/pyflink/fn_execution/beam/beam_worker_pool_service.py", line 31, in <module>
    from apache_beam.options.pipeline_options import DebugOptions
  File "/Users/vancior/miniconda3/envs/flink-python/lib/python3.8/site-packages/apache_beam/__init__.py", line 92, in <module>
    from apache_beam import coders
  File "/Users/vancior/miniconda3/envs/flink-python/lib/python3.8/site-packages/apache_beam/coders/__init__.py", line 17, in <module>
    from apache_beam.coders.coders import *
  File "/Users/vancior/miniconda3/envs/flink-python/lib/python3.8/site-packages/apache_beam/coders/coders.py", line 59, in <module>
    from apache_beam.coders import coder_impl
  File "apache_beam/coders/coder_impl.py", line 63, in init apache_beam.coders.coder_impl
  File "/Users/vancior/miniconda3/envs/flink-python/lib/python3.8/site-packages/apache_beam/typehints/__init__.py", line 31, in <module>
    from apache_beam.typehints.pandas_type_compatibility import *
  File "/Users/vancior/miniconda3/envs/flink-python/lib/python3.8/site-packages/apache_beam/typehints/pandas_type_compatibility.py", line 81, in <module>
    (pd.Int8Dtype(), Optional[np.int8]),
AttributeError: module 'pandas' has no attribute 'Int8Dtype' {code}



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