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

Error while importing sparkdl #228

Open
jai-dewani opened this issue May 23, 2020 · 0 comments
Open

Error while importing sparkdl #228

jai-dewani opened this issue May 23, 2020 · 0 comments

Comments

@jai-dewani
Copy link

I am using a local system to run sparkdl, installed sparkdl with the help of pip but while trying run

import sparkdl

This error was thrown out

Using TensorFlow backend.
Traceback (most recent call last):
  File "script.py", line 5, in <module>
    import sparkdl
  File "/home/iitn/anaconda3/lib/python3.7/site-packages/sparkdl/__init__.py", line 21, in <module>
    from sparkdl.estimators.text_estimator import TextEstimator, KafkaMockServer
  File "/home/iitn/anaconda3/lib/python3.7/site-packages/sparkdl/estimators/text_estimator.py", line 28, in <module>
    from kafka import KafkaConsumer
  File "/home/iitn/anaconda3/lib/python3.7/site-packages/kafka/__init__.py", line 23, in <module>
    from kafka.producer import KafkaProducer
  File "/home/iitn/anaconda3/lib/python3.7/site-packages/kafka/producer/__init__.py", line 4, in <module>
    from .simple import SimpleProducer
  File "/home/iitn/anaconda3/lib/python3.7/site-packages/kafka/producer/simple.py", line 54
    return '<SimpleProducer batch=%s>' % self.async

I think it has something to with the fact that async was introduced as a keyword in python 3.7 and you can't name a variable async. The workaround is to use kafka-python instead of kafka as mentioned in this issue
dpkp/kafka-python#1566

Python version 3.7 :: Anaconda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant