CLARIAH / grlc

grlc builds Web APIs using shared SPARQL queries
http://grlc.io
MIT License
136 stars 32 forks source link

"cannot access local variable ‘query_metadata’ where it is not associated with a value" #481

Closed bherr2 closed 1 month ago

bherr2 commented 3 months ago

We have serveral grlc endpoints on our repository here: https://github.com/hubmapconsortium/ccf-grlc which have subdirectories to separate out queries. All of these show the warning message "cannot access local variable ‘query_metadata’ where it is not associated with a value". I've tried to figure out why it shows this, but could not track it down. It doesn't break the queries, but it makes users think the site is broken.

c-martinez commented 2 months ago

Hi @bherr2,

This is definitely a bug. It seems as grlc is trying to process queries.json as a query in json, but it is failing to realise it is not a query, and running into an exception (and not a very clear one).

Will look into it.

c-martinez commented 1 month ago

This issue is solved by #487.

Well, I say that, but it is only solved in the dev branch and not yet released. I guess we will do a next release soon to fix this, right @albertmeronyo?

In the mean time, it is already working on https://dev.grlc.io/, for example https://dev.grlc.io/api-git/hubmapconsortium/ccf-grlc/subdir/hra/ should work. @bherr2, could you confirm this works for you?

I will close this issue, but please re-open it if necessary.

bherr2 commented 1 month ago

Works for me, thanks!