Reputation: 1
When I am running faust --version
in my DockerFile then I am getting following error:
Traceback (most recent call last):
File "/usr/local/bin/faust", line 5, in <module>
from faust.cli.faust import cli
File "/usr/local/lib/python3.8/dist-packages/faust/cli/faust.py", line 9, in <module>
from .model import model
File "/usr/local/lib/python3.8/dist-packages/faust/cli/model.py", line 8, in <module>
from faust.models import registry
File "/usr/local/lib/python3.8/dist-packages/faust/models/__init__.py", line 4, in <module>
from .record import Record
File "/usr/local/lib/python3.8/dist-packages/faust/models/record.py", line 20, in <module>
from mode.utils.compat import OrderedDict
ImportError: cannot import name 'OrderedDict' from 'mode.utils.compat' (/usr/local/lib/python3.8/dist-packages/mode/utils/compat.py)
error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1
I am using faust-streaming==0.10.13
and python==3.8 version in my services.
I have tried upgrading it to latest version i.e. faust-streaming 0.11.0
but still getting same error. Can anyone help me into this?
Upvotes: 0
Views: 281
Reputation: 1
I had the same issue with my work and the reason behind this is that the mode package that faust uses seems to be a modified version of the real mode package and the developer seems to have created their own code, so you just need to use an older version of the "faust mode" before these changes came in.
in your requirements.txt file after you call faust-streaming==0.10.13, add a line that says mode-streaming==0.3.5
the mode version 0.3.5 and earlier uses the syntax that would work with your faust streaming version
Upvotes: 0