You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by Rohith Vallu <vr...@gmail.com> on 2022/04/21 22:20:28 UTC
Issue while running word_count.py
Hi,
I set up pyflink on my system for python version 3.7.5 and pyflink version
1.14.4.
When i try to run word_count.py using command "python word_count.py" I get
this error
Traceback (most recent call last):
File "word_count.py", line 146, in <module>
word_count(known_args.input, known_args.output)
File "word_count.py", line 68, in word_count
t_env.get_config().set_string("parallelism.default", "1")
AttributeError: 'TableConfig' object has no attribute 'set'
Can you help in resolving this issue?
Best
Rohith.
Re: Issue while running word_count.py
Posted by Xingbo Huang <hx...@gmail.com>.
Hi Rohith,
I guess the `word_count.py` you tried to execute is from flink release-1.15
or master branch. For pyflink 1.14 you are using, you need to change
`t_env.get_config().set_string("parallelism.default", "1")` to
`t_env.get_config().get_configuration().set_string("parallelism.default",
"1")`
Best,
Xingbo
Rohith Vallu <vr...@gmail.com> 于2022年4月22日周五 09:40写道:
> Hi,
>
> I set up pyflink on my system for python version 3.7.5 and pyflink version
> 1.14.4.
> When i try to run word_count.py using command "python word_count.py" I get
> this error
>
> Traceback (most recent call last):
> File "word_count.py", line 146, in <module>
> word_count(known_args.input, known_args.output)
> File "word_count.py", line 68, in word_count
> t_env.get_config().set_string("parallelism.default", "1")
> AttributeError: 'TableConfig' object has no attribute 'set'
>
> Can you help in resolving this issue?
>
> Best
> Rohith.
>