robinhood / faust

Python Stream Processing
Other
6.72k stars 535 forks source link

Livecheck example code doesn't work on master branch #693

Open thesyntaxinator opened 3 years ago

thesyntaxinator commented 3 years ago

Checklist

Steps to reproduce

Run livecheck example code (https://github.com/robinhood/faust/blob/master/examples/livecheck.py).

Expected behavior

Example code should run.

Actual behavior

I get 2 errors, one of which seems related to autodiscovery (see traceback below).

Full traceback

Traceback (most recent call last):
  File "~/Library/Python/3.8/lib/python/site-packages/faust/app/base.py", line 712, in discover
    module = importlib.import_module(name)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'examples'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "examples/livecheck.py", line 210, in <module>
    app.main()
  File "~/Library/Python/3.8/lib/python/site-packages/faust/app/base.py", line 749, in main
    self.discover()
  File "~/Library/Python/3.8/lib/python/site-packages/faust/app/base.py", line 714, in discover
    raise ModuleNotFoundError(
ModuleNotFoundError: Unknown module examples.livecheck in App.conf.autodiscover list

Versions