marcosschroh / cookiecutter-faust

A Cookiecutter template for creating Faust projects quickly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No module named 'super_faust'

TomGoBravo opened this issue · comments

Looks like the cookiecutter missed a bit of cutting because super_faust is found in my project :-P

make run-dev outputs:

replay_output_experiment_1  | Traceback (most recent call last):
replay_output_experiment_1  |   File "/usr/local/lib/python3.7/site-packages/faust/app/base.py", line 641, in discover
replay_output_experiment_1  |     module = importlib.import_module(name)
replay_output_experiment_1  |   File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
replay_output_experiment_1  |     return _bootstrap._gcd_import(name[level:], package, level)
replay_output_experiment_1  |   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
replay_output_experiment_1  |   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
replay_output_experiment_1  |   File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
replay_output_experiment_1  | ModuleNotFoundError: No module named 'super_faust'
replay_output_experiment_1  | 
replay_output_experiment_1  | During handling of the above exception, another exception occurred:
replay_output_experiment_1  | 
replay_output_experiment_1  | Traceback (most recent call last):
replay_output_experiment_1  |   File "/usr/local/bin/replay_output_experiment", line 11, in <module>
replay_output_experiment_1  |     load_entry_point('Replay-Output-Experiment', 'console_scripts', 'replay_output_experiment')()
replay_output_experiment_1  |   File "/replay_output_experiment/replay_output_experiment/app.py", line 18, in main
replay_output_experiment_1  |     app.main()
replay_output_experiment_1  |   File "/usr/local/lib/python3.7/site-packages/faust/app/base.py", line 672, in main
replay_output_experiment_1  |     self.discover()
replay_output_experiment_1  |   File "/usr/local/lib/python3.7/site-packages/faust/app/base.py", line 644, in discover
replay_output_experiment_1  |     f'Unknown module {name} in App.conf.autodiscover list')
replay_output_experiment_1  | ModuleNotFoundError: Unknown module super_faust in App.conf.autodiscover list
replay_output_experiment_replay_output_experiment_1 exited with code 1

Hi, thanks for de feedback. I know what is the problem. The project root is using a hardoded name instead of replacing it by the name generated by cookiecutter. I will fix it !

Hi again,

With this PR should be fixed #12.

Like I have explained above, the name was hardcoded. Also, the broker should not be inside quotes. We should add a test for the docker image as well to prevent these issues!

Let me know if you have any questions!

Cool, thank you.