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 message when we mispell a func_adl function is not helpful #232

Open
gordonwatts opened this issue Sep 15, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@gordonwatts
Copy link
Member

Tried this:

from servicex import query as q, deliver, dataset


def func_adl_xaod_simple():
    query = q.FuncADL_ATLASr22()  # type: ignore
    jets_per_event = query.Select(lambda e: e.Jets('AnalysisJets'))
    jet_info_per_event = jets_per_event.Select(
        lambda jets: {
            'pt': jets.Select(lambda j: j.pt()),
            'eta': jets.elect(lambda j: j.eta())
        }
    )

    spec = {
        'Sample': [{
            'Name': "func_adl_xAOD_simple",
            'Dataset': dataset.FileList(
                [
                    "root://eospublic.cern.ch//eos/opendata/atlas/rucio/mc20_13TeV/DAOD_PHYSLITE.37622528._000013.pool.root.1",  # noqa: E501
                ]
            ),
            'Query': jet_info_per_event
        }]
    }
    files = deliver(spec, servicex_name="servicex-uc-af")
    assert files is not None, "No files returned from deliver! Internal error"
    return files


if __name__ == "__main__":
    files = func_adl_xaod_simple()
    assert len(files['func_adl_xAOD_simple']) == 1

(note the missing S on the second select, I get an error message on the logs as:

Traceback (most recent call last):
  File "/home/servicex/servicex_app/resources/transformation/submit.py", line 198, in post
    self.code_gen_service.generate_code_for_selection(request_rec, namespace,
  File "/home/servicex/servicex_app/code_gen_adapter.py", line 70, in generate_code_for_selection
    raise ValueError(f'Failed to generate translation code: {msg}')
ValueError: Failed to generate translation code: Internal Error: attempted to get C++ representation for AST node "Name(id='j')", but failed.
@gordonwatts gordonwatts added the bug Something isn't working label Sep 15, 2024
@gordonwatts gordonwatts self-assigned this Sep 15, 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
Projects
None yet
Development

No branches or pull requests

1 participant