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

Internal validator failures #1272

Closed
jjmortensen opened this issue Jul 12, 2022 · 5 comments · Fixed by #1273
Closed

Internal validator failures #1272

jjmortensen opened this issue Jul 12, 2022 · 5 comments · Fixed by #1273

Comments

@jjmortensen
Copy link

See: https://gitlab.com/jensj/ase-optimade/-/jobs/2709917839

@ml-evs
Copy link
Member

ml-evs commented Jul 12, 2022

Thanks for the report @jjmortensen, could you paste the response to the failing query on your local server? Looks like /structures?filter=id%20%3E%20%221%22. It is probably caused by one of your structure entries having a missing type field and by this point of validation we assume it is present.

@jjmortensen
Copy link
Author

{
    "data": [
        {
            "id": "2",
            "attributes": {
                "cartesian_site_positions": [
                    [
                        0.0,
                        0.0,
                        0.0
                    ],
                    [
                        0.0,
                        0.0,
                        0.0
                    ]
                ],
                "species_at_sites": [
                    "C",
                    "O"
                ],
                "species": [
                    {
                        "name": "C",
                        "chemical_symbols": [
                            "C"
                        ],
                        "concentration": [
                            1.0
                        ]
                    },
                    {
                        "name": "O",
                        "chemical_symbols": [
                            "O"
                        ],
                        "concentration": [
                            1.0
                        ]
                    }
                ],
                "lattice_vectors": [
                    [
                        0.0,
                        0.0,
                        0.0
                    ],
                    [
                        0.0,
                        0.0,
                        0.0
                    ],
                    [
                        0.0,
                        0.0,
                        0.0
                    ]
                ],
                "dimension_types": [
                    1,
                    1,
                    1
                ],
                "last_modified": "2022-07-12T13:32:57Z",
                "elements": [
                    "C",
                    "O"
                ],
                "elements_ratios": [
                    0.5,
                    0.5
                ],
                "structure_features": [],
                "id": "2",
                "chemical_formula_descriptive": "x",
                "chemical_formula_reduced": "CO",
                "chemical_formula_anonymous": "AB",
                "chemical_formula_hill": "CO",
                "nsites": 2,
                "nelements": 2,
                "nperiodic_dimensions": 3
            }
        }
    ],
    "meta": {
        "query": {
            "representation": "/info?"
        },
        "api_version": "1.1.0",
        "more_data_available": false,
        "data_returned": 1,
        "provider": {
            "name": "OASE",
            "description": "OPTIMADE for ASE",
            "prefix": "cmr",
            "homepage": "https://gitlab.com/jensj/ase-optimade"
        },
        "data_available": 1,
        "implementation": {
            "name": "oase",
            "version": "22.7.0",
            "source_url": "https://gitlab.com/jensj/ase-optimade",
            "maintainer": {
                "email": "jjmo@dtu.dk"
            }
        },
        "time_stamp": "2022-07-12 15:33:01.980485"
    }
}

@jjmortensen
Copy link
Author

Indeed, adding "type": "structures" fixes it!

@jjmortensen
Copy link
Author

Thanks!

@ml-evs
Copy link
Member

ml-evs commented Jul 12, 2022

Great, we've tried to wrap other internal errors like this as validation failures so I think it's useful to keep this open as a non-urgent issue and I will get around to tweaking it for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants