[
https://issues.apache.org/jira/browse/FLINK-32207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alireza Omidvar updated FLINK-32207:
------------------------------------
Summary: Error import Pyflink.table.descriptors due to python3.10 version
mismatch (was: Error import Pyflink.table.descriptors sue to python3.10
version mismatch)
> Error import Pyflink.table.descriptors due to python3.10 version mismatch
> -------------------------------------------------------------------------
>
> Key: FLINK-32207
> URL: https://issues.apache.org/jira/browse/FLINK-32207
> Project: Flink
> Issue Type: Bug
> Components: API / Python
> Affects Versions: 1.17.0
> Environment: Colab
> Python3.10
> Reporter: Alireza Omidvar
> Priority: Major
> Fix For: 1.17.1
>
> Attachments: image (1).png, image (2).png
>
>
> Gentlemen,
>
>
>
> I have problem with some apache-flink modules. I am running a 1.17.0 apache-
> flink and I write test codes in Colab I faced a problem for import modules
>
>
>
>
> from pyflink.table import DataTypes
>
> from pyflink.table.descriptors import Schema, Kafka, Json, Rowtime
>
> from pyflink.table.catalog import FileSystem
>
>
>
>
> not working for me (python version 3.10)
>
>
> Any help is highly appreciated the strange is that other modules importing
> fine. I checked with your Github but didn't find these on yours too which
> means modules are not inside your descriptor.py too. I think it needed
> installation of connectors but it failed too.
>
>
>
>
> Please see the link below:
>
>
>
>
>
> [https://github.com/aomidvar/scrapper-price-comparison/blob/d8a10f74101bf96974e769813c33b83d7a71f02b/kafkaconsumer1.ipynb]
>
>
>
>
> I am running a test after producing the stream
> ([https://github.com/aomidvar/scrapper-price-comparison/blob/main/kafkaproducer1.ipynb])
> to Confluent server and I like to do a flink job but the above mentioned
> modules are not found with the following links in collab:
>
>
> That is not probably a bug. Only version of apache-flink now working on colab
> is 1.17.0. I prefer 3.10 but installed a virtual python 3.8 env and between
> different modules found out that Kafka and Json modules are not in
> descriptors.py of version 1.17 Apache-flink default. But modules exist in
> Apache-flink 1.13 version.
> [https://colab.research.google.com/drive/1aHKv8WA6RA10zTdwdzUubB5K0anEmOws?usp=sharing]
> [https://colab.research.google.com/drive/1eCHJlsb8AjdmJtPc95X3H4btmFVSoCL4?usp=sharing]
>
> I've got this error for Json, Kafka ...
> ---------------------------------------------------------------------------
>
> ImportError Traceback (most recent call last) <ipython-input-1-203af9e2c559>
> in <cell line: 2>() 1 from pyflink.table import DataTypes ----> 2 from
> pyflink.table.descriptors import Schema, Kafka, Json, Rowtime 3 from
> pyflink.table.catalog import FileSystem ImportError: cannot import name
> 'Kafka' from 'pyflink.table.descriptors'
> (/usr/local/lib/python3.10/dist-packages/pyflink/table/descriptors.py)
>
> ---------------------------------------------------------------------------
>
> NOTE: If your import is failing due to a missing package, you can manually
> install dependencies using either !pip or !apt. To view examples of
> installing some common dependencies, click the "Open Examples" button below.
>
> ---------------------------------------------------------------------------
>
> I have doubt that if current error is related to a version and dependencies
> then
>
> I have to ask the developer if I do this python 3.8 env is that possible to
> get solved?
>
>
> Thanks for your time ,
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)