Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid syntax #2338

Closed
SmasterZheng opened this issue Nov 23, 2022 · 2 comments
Closed

invalid syntax #2338

SmasterZheng opened this issue Nov 23, 2022 · 2 comments
Labels

Comments

@SmasterZheng
Copy link

simple.py line 54
self.async

@oolongtea
Copy link

same error with python 3.10.6 and kafka==1.3.5

Traceback (most recent call last):
  File "/home/.../my-script.py", line 7, in <module>
    from kafka import KafkaConsumer, KafkaProducer
  File "/home/.../my-env/lib/python3.10/site-packages/kafka/__init__.py", line 23, in <module>
    from kafka.producer import KafkaProducer
  File "/home/.../my-env/lib/python3.10/site-packages/kafka/producer/__init__.py", line 4, in <module>
    from .simple import SimpleProducer
  File "/home/.../my-env/lib/python3.10/site-packages/kafka/producer/simple.py", line 54
    return '<SimpleProducer batch=%s>' % self.async
                                              ^^^^^
SyntaxError: invalid syntax

@wbarnha wbarnha added the bug label Aug 5, 2023
@wbarnha
Copy link
Collaborator

wbarnha commented Aug 8, 2023

SimpleProducers and other Simple classes were removed in #1196. Upgrading your kafka-python installation is recommended.

@wbarnha wbarnha closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants