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

Asking a syntax of paging #2020

Closed
tuocvu opened this issue Mar 28, 2024 · 1 comment
Closed

Asking a syntax of paging #2020

tuocvu opened this issue Mar 28, 2024 · 1 comment

Comments

@tuocvu
Copy link

tuocvu commented Mar 28, 2024

Dear All,
I've recently make a query as:
optimade-get https://nomad-lab.eu/prod/rae/optimade/ --use-async --filter 'nelements = 2 AND elements HAS ALL "Sc","H"' --max-results-per-provider 1000 --http-timeout 3000 --output-file bi-H-Sc.json
╭─────────────────────────────────────────────────────────────────────────────────╮
│ Performing query structures/?filter=nelements = 2 AND elements HAS ALL "Sc","H" │
╰─────────────────────────────────────────────────────────────────────────────────╯
Error: Provider 'https://nomad-lab.eu/prod/rae/optimade/' returned: ['RuntimeError: 500 -
https://nomad-lab.eu/prod/rae/optimade/v1/structures?filter=nelements+%3D+2+AND+elements+H
AS+ALL+%22Sc%22%2C%22H%22&page_offset=460: ExtraData: unpack(b) received extra data.']
✓ nomad-lab.eu/prod/rae/optimade/v1/structures ━━━━━━━━━━━━━━━━━━━━━━━━━━━ 460/460 0:00:32

I have encountered 940 structures in the results. However, due to the default page_offset being set to 460, I am unable to retrieve all the data. Your suggestions on how to address this through paging would be greatly appreciated.

Thank you for your assistance.
Tuoc Vu
Hanoi Univ. of Science and Technology

@ml-evs
Copy link
Member

ml-evs commented Mar 28, 2024

Hi @tuocvu, thanks for the question. The optimade-get client will do paging for you, until it runs out of results. What you're seeing in the error message is actually an error on the server side: optimade-get tried to pull the page with offset 460 and the server returned "500 ExtraData: unpack received extra data", probably due to a bad entry somewhere in NOMAD.

You can see the same results in your browser at https://nomad-lab.eu/prod/rae/optimade/v1/structures?filter=nelements+%3D+2+AND+elements+HAS+ALL+%22Sc%22%2C%22H%22&page_offset=460.

In fact if I reduce the page limit to 1 we can see that it is only this structure that is failing:

https://nomad-lab.eu/prod/rae/optimade/v1/structures?filter=nelements+%3D+2+AND+elements+HAS+ALL+%22Sc%22%2C%22H%22&page_offset=468&page_limit=1

The next step would be to contact NOMAD and ask them about the issue, providing them specifics on the failing query and entry. I recommend using the matsci.org forums where they maintain a presence at https://matsci.org/c/nomad/32 (you can link them to this GitHub issue too).

@ml-evs ml-evs closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
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