jina-ai / examples

Jina examples and demos to help you get started
https://docs.jina.ai
Apache License 2.0
453 stars 140 forks source link

Query function is not working for urbandict-search example #34

Closed emrebayramc closed 4 years ago

emrebayramc commented 4 years ago

I am having the below problem while trying to run query for urbandict-search (python app.py -t query ).

TypeError: py_client() got multiple values for keyword argument 'port_grpc'

The cause is in _get_client function of flow; port_grpc is already defined but it is also coming from kwargs from above. The reason is flow-query.yml of urbandict-search has "port_grpc: 56798" defined in it. This line should be removed.

nan-wang commented 4 years ago

I am having the below problem while trying to run query for urbandict-search (python app.py -t query ).

TypeError: py_client() got multiple values for keyword argument 'port_grpc'

The cause is in _get_client function of flow; port_grpc is already defined but it is also coming from kwargs from above. The reason is flow-query.yml of urbandict-search has "port_grpc: 56798" defined in it. This line should be removed.

hi, @kazanture Thanks for posting! Would you please post the version information of jina so that we can dig into this issue?

jina --version
emrebayramc commented 4 years ago

(examples) emre@emre-desktop:~/examples/urbandict-search$ jina --version 0.1.12

emrebayramc commented 4 years ago

But i believe it is not about the jina version; it is about the flow-query.yml of this specific example. All the other examples do not have "port_grpc: 56798" line in flow-query.yml . Which is triggering the bug. But maybe you prefer to fix it in jina so even if the port is provided in the yaml file; it doesnt fail.

nan-wang commented 4 years ago

hi, @kazanture Yes, you are right about the quick fix. Under the hood, this bug is due to the conflicts between two changes on both examples and jina sides. I've raised an issue at jina::issue-416 and working on a more general fix.

nan-wang commented 4 years ago

@kazanture hi, there. I've fixed this issue at PR-418. Would you please give it another shot? ;)