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 in example for docker service #28

Open
adamwawrzynski opened this issue Aug 27, 2020 · 1 comment
Open

Error in example for docker service #28

adamwawrzynski opened this issue Aug 27, 2020 · 1 comment

Comments

@adamwawrzynski
Copy link

Running example for docker service:

$ python3 stuff/python/liner2rmq.py -t "Pani Ala Nowak mieszkw w Zielonej Górze"

I've got error as follows:

[INFO] Temp route: route-DYOWAE
[INFO] Temp input file: /tmp/ngm6jgy_
[INFO] Sent msg 'route-DYOWAE /tmp/ngm6jgy_' to liner2-input
Traceback (most recent call last):
  File "stuff/python/liner2rmq.py", line 101, in <module>\n
    process_text(text, args.o)\n
  File "stuff/python/liner2rmq.py", line 82, in process_text
    xml = liner2.process(text)
  File "stuff/python/liner2rmq.py", line 61, in process
    output_path = self.receive(route)
  File "stuff/python/liner2rmq.py", line 29, in receive
    result = channel.queue_declare(exclusive=True)
TypeError: queue_declare() missing 1 required positional argument: 'queue'

Line 29 in file "stuff/python/liner2rmq.py" looks like this:

        result = channel.queue_declare(exclusive=True)

And should be changed for this:

        result = channel.queue_declare(queue=self.output_queue, exclusive=True)

After this change code works just fine.

@MGniew
Copy link

MGniew commented Feb 2, 2021

This is actually because the pika library you have installed is to new. The supported version is probably 0.12

python3 -m pip install pika==0.12

Nevertheless, it should be specified in the requirements.txt or at least mentioned in README.md

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

2 participants