modulenotfounderror(“'kafka'不是有效名称你是说爱奥Kafka,Kafka

lqfhib0f  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(236)

我使用celery 和Kafka来运行一些作业,以便将数据推送到Kafka。我也用浮士德来联系工人。但不幸的是,我在运行后出现了一个错误 faust -A project.streams.app worker -l info 为了运行管道。我想知道是否有人能帮助我。

/home/admin/.local/lib/python3.6/site-packages/faust/fixups/django.py:71: UserWarning: Using settings.DEBUG leads to a memory leak, never
use this setting in production environments!

  warnings.warn(WARN_DEBUG_ENABLED)
Command raised exception: ModuleNotFoundError("'kafka' is not a valid name. Did you mean one of aiokafka, kafka?",)
  File "/home/admin/.local/lib/python3.6/site-packages/mode/worker.py", line 67, in exiting
    yield
  File "/home/admin/.local/lib/python3.6/site-packages/faust/cli/base.py", line 528, in _inner
    cmd()
  File "/home/admin/.local/lib/python3.6/site-packages/faust/cli/base.py", line 611, in __call__
    self.run_using_worker(*args,**kwargs)
  File "/home/admin/.local/lib/python3.6/site-packages/faust/cli/base.py", line 620, in run_using_worker
    self.on_worker_created(worker)
  File "/home/admin/.local/lib/python3.6/site-packages/faust/cli/worker.py", line 57, in on_worker_created
    self.say(self.banner(worker))
  File "/home/admin/.local/lib/python3.6/site-packages/faust/cli/worker.py", line 97, in banner
    self._banner_data(worker))
  File "/home/admin/.local/lib/python3.6/site-packages/faust/cli/worker.py", line 127, in _banner_data
    ('  transport', app.transport.driver_version),
  File "/home/admin/.local/lib/python3.6/site-packages/faust/app/base.py", line 1831, in transport
    self._transport = self._new_transport()
  File "/home/admin/.local/lib/python3.6/site-packages/faust/app/base.py", line 1686, in _new_transport
    return transport.by_url(self.conf.broker_consumer[0])(
  File "/home/admin/.local/lib/python3.6/site-packages/mode/utils/imports.py", line 101, in by_url
    return self.by_name(URL(url).scheme)
  File "/home/admin/.local/lib/python3.6/site-packages/mode/utils/imports.py", line 115, in by_name
    f'{name!r} is not a valid name. {alt}') from exc

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题