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 to get the relation label #53

Open
EricFerreiraS opened this issue Sep 12, 2022 · 0 comments
Open

Error to get the relation label #53

EricFerreiraS opened this issue Sep 12, 2022 · 0 comments

Comments

@EricFerreiraS
Copy link

I'm using the python kgtk library to work with the cskg.tsv file. When I execute the following query: kgtk(""" query -i cskg.tsv --match '(n1)-[r]->(n2)' --where 'n1.label="bicycle"' --return 'n1.label, n2.label, r.relation' --limit 3 """) I got the values `

node1;label node2;label relation
bicycle bicycle shop /r/AtLocation
bicycle garage /r/AtLocation
bicycle lab /r/AtLocation
`

but when I change to
kgtk(""" query -i cskg.tsv --match '(n1)-[r]->(n2)' --where 'n1.label="bicycle"' --return 'n1.label, n2.label, r.label' --limit 3 """)
I got the following error: `Exception in thread background thread for pid 81394:
Traceback (most recent call last):
File "/Users/u/opt/anaconda3/envs/kgtk-env/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/Users/u/opt/anaconda3/envs/kgtk-env/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "/Users/u/opt/anaconda3/envs/kgtk-env/lib/python3.9/site-packages/sh.py", line 1641, in wrap
fn(*rgs, **kwargs)
File "/Users/u/opt/anaconda3/envs/kgtk-env/lib/python3.9/site-packages/sh.py", line 2569, in background_thread
handle_exit_code(exit_code)
File "/Users/u/opt/anaconda3/envs/kgtk-env/lib/python3.9/site-packages/sh.py", line 2269, in fn
return self.command.handle_command_exit_code(exit_code)
File "/Users/u/opt/anaconda3/envs/kgtk-env/lib/python3.9/site-packages/sh.py", line 869, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:

RAN: /bin/bash -c 'kgtk query -i cskg.tsv --match '"'"'(n1)-[r]->(n2)'"'"' --where '"'"'n1.label="bicycle"'"'"' --return '"'"'n1.label, n2.label, r.label'"'"' --limit 3'

STDOUT:

STDERR:

no such column: graph_1_c1.label`

Is there any way to get the relation's label? When I run the query without the return parameter, I see a column with the label.

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

1 participant