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

Transformers not recognizing LinksResource #939

Closed
CasperWA opened this issue Sep 6, 2021 · 4 comments
Closed

Transformers not recognizing LinksResource #939

CasperWA opened this issue Sep 6, 2021 · 4 comments
Labels
bug Something isn't working on-hold For PRs/issues that are on-hold for an unspecified time priority/medium Issue or PR with a consensus of medium priority transformers Related to all filter transformers

Comments

@CasperWA
Copy link
Member

CasperWA commented Sep 6, 2021

I am currently getting an error with the vanilla server that, e.g., "link_type is not a known or searchable quantity".

This is an issue because it comes from the BaseTransformer, so even if extending here, the error persists.

A traceback:

Traceback (most recent call last):
  File "python3.7/site-packages/lark/visitors.py", line 93, in _call_userfunc
    return f(children)
  File "python3.7/site-packages/optimade/filtertransformers/mongo.py", line 201, in property
    quantity = super().property(args)
  File "python3.7/site-packages/optimade/filtertransformers/base_transformer.py", line 267, in property
    detail=f"'{quantity_name}' is not a known or searchable quantity"
optimade.server.exceptions.BadRequest: 'link_type' is not a known or searchable quantity
@CasperWA CasperWA added bug Something isn't working priority/high Issue or PR with a consensus of high priority transformers Related to all filter transformers labels Sep 6, 2021
@CasperWA
Copy link
Member Author

CasperWA commented Sep 6, 2021

Hmm - I'm having trouble properly reproducing this outside my own environment. Let me jiggle a bit.

@CasperWA CasperWA added on-hold For PRs/issues that are on-hold for an unspecified time priority/medium Issue or PR with a consensus of medium priority and removed priority/high Issue or PR with a consensus of high priority labels Sep 6, 2021
@CasperWA
Copy link
Member Author

CasperWA commented Sep 6, 2021

As a note, I've narrowed it down to a local(?) issue with optimade.server.schemas.retrieve_queryable_properties().
If I try to locally import LinksResource and StructureResource, run it through retrieve_queryable_properties() and check the .keys() of the output, I get attributes included for LinksResource (and none of its contents), while it's the opposite for StructureResource (all of the contents under attributes, but not attributes itself).

@eimrek
Copy link

eimrek commented Jan 16, 2024

Note: this problem came up for me as well for a fully-dockerized index-metadatabase with different versions of the image: 0.17.2, 0.18.0, 0.25.3. But fortunately 1.0.2 worked.

@ml-evs
Copy link
Member

ml-evs commented Jan 16, 2024

I will take that as an excuse to close the issue 🙃 I don't think we're using the same retrieve_queryable_properties approach anymore so imagine this "just works" with v1+.

@ml-evs ml-evs closed this as completed Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working on-hold For PRs/issues that are on-hold for an unspecified time priority/medium Issue or PR with a consensus of medium priority transformers Related to all filter transformers
Projects
None yet
Development

No branches or pull requests

3 participants