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

Fix: get_general_task_subtasks for ScaledSolutions #122

Open
chrisdicaprio opened this issue Jun 1, 2022 · 0 comments
Open

Fix: get_general_task_subtasks for ScaledSolutions #122

chrisdicaprio opened this issue Jun 1, 2022 · 0 comments

Comments

@chrisdicaprio
Copy link
Contributor

chrisdicaprio commented Jun 1, 2022

When calling get_general_task_subtasks for a GT that produced ScaledInversionSolutions, we get the following error:

Traceback (most recent call last):
  File "/home/chrisdc/NSHM/DEV/scripts/get_output_ids_and_meta.py", line 24, in <module>
    for id in output_ids:
  File "/home/chrisdc/NSHM/DEV/nzshm-runzi/runzi/automation/scaling/file_utils.py", line 12, in get_output_file_ids
    api_result = general_task_api.get_subtask_files(upstream_task_id)
  File "/home/chrisdc/NSHM/DEV/nzshm-runzi/runzi/automation/scaling/toshi_api/toshi_api.py", line 47, in get_subtask_files
    gt = self.get_general_task_subtasks(id)
  File "/home/chrisdc/NSHM/DEV/nzshm-runzi/runzi/automation/scaling/toshi_api/toshi_api.py", line 99, in get_general_task_subtasks
    executed = self.run_query(qry, input_variables)
  File "/home/chrisdc/.virtualenvs/test_oq_reports/lib/python3.8/site-packages/nshm_toshi_client/toshi_client_base.py", line 78, in run_query
    response = self._client.execute(gql_query, variable_values)
  File "/home/chrisdc/.virtualenvs/test_oq_reports/lib/python3.8/site-packages/gql/client.py", line 370, in execute
    return self.execute_sync(
  File "/home/chrisdc/.virtualenvs/test_oq_reports/lib/python3.8/site-packages/gql/client.py", line 188, in execute_sync
    return session.execute(
  File "/home/chrisdc/.virtualenvs/test_oq_reports/lib/python3.8/site-packages/gql/client.py", line 783, in execute
    raise TransportQueryError(
gql.transport.exceptions.TransportQueryError: {'message': "object of type 'NoneType' has no len()"}

commenting out line 72 in toshi_api.py swept_arguments in the query fixes the problem

PROD GT example R2VuZXJhbFRhc2s6MTAzMDc1

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

1 participant