An upload to the iam-diagnostics-internal failed twice with strange error messages:
sqlalchemy.exc.OperationalError: (psycopg.OperationalError) sending query and params failed: number of parameters must be between 0 and 65535
[SQL: SELECT DISTINCT model.name
FROM iamc_timeseries JOIN run ON run.id = iamc_timeseries.run__id JOIN model ON model.id = run.model__id
WHERE iamc_timeseries.id IN (%(id_1_1)s::INTEGER, %(id_1_2)s:: ... ::INTEGER)]
[parameters: {'id_1_1': 1, 'id_1_2': 2, ..., 'id_1_72148': 72148}]
When trying to process that file again, the process again failed with the following error message:
sqlalchemy.exc.IntegrityError: (psycopg.errors.ForeignKeyViolation) update or delete on table "iamc_measurand" violates foreign key constraint "fk_iamc_timeseries_measurand__id_iamc_measurand" on table "iamc_timeseries"
DETAIL: Key (id)=(2549) is still referenced from table "iamc_timeseries".
[SQL: DELETE FROM iamc_measurand WHERE iamc_measurand.id IN (SELECT iamc_measurand_version.id
FROM iamc_measurand_version
WHERE (iamc_measurand_version.id NOT IN (SELECT iamc_measurand_version.id
FROM iamc_measurand_version
WHERE (EXISTS (SELECT iamc_timeseries_version.id
FROM iamc_timeseries_version
WHERE iamc_timeseries_version.measurand__id = iamc_measurand_version.id AND iamc_timeseries_version.run__id = %(run__id_1)s::INTEGER)) AND iamc_measurand_version.transaction_id <= %(transaction_id_1)s::BIGINT AND iamc_measurand_version.operation_type != %(operation_type_1)s::SMALLINT AND (iamc_measurand_version.end_transaction_id > %(end_transaction_id_1)s::BIGINT OR iamc_measurand_version.end_transaction_id IS NULL))) AND iamc_measurand_version.id IN (SELECT iamc_measurand_version.id
FROM iamc_measurand_version
WHERE (EXISTS (SELECT iamc_timeseries_version.id
FROM iamc_timeseries_version
WHERE iamc_timeseries_version.measurand__id = iamc_measurand_version.id AND iamc_timeseries_version.run__id = %(run__id_1)s::INTEGER)) AND iamc_measurand_version.transaction_id <= %(transaction_id_2)s::BIGINT AND iamc_measurand_version.operation_type != %(operation_type_2)s::SMALLINT AND (iamc_measurand_version.end_transaction_id > %(end_transaction_id_2)s::BIGINT OR iamc_measurand_version.end_transaction_id IS NULL)) AND iamc_measurand_version.transaction_id <= %(transaction_id_3)s::BIGINT AND iamc_measurand_version.operation_type != %(operation_type_3)s::SMALLINT AND (iamc_measurand_version.end_transaction_id > %(end_transaction_id_3)s::BIGINT OR iamc_measurand_version.end_transaction_id IS NULL)) RETURNING iamc_measurand.id]
[parameters: {'run__id_1': 3, 'transaction_id_1': 149884, 'operation_type_1': 2, 'end_transaction_id_1': 149884, 'transaction_id_2': 296734, 'operation_type_2': 2, 'end_transaction_id_2': 296734, 'transaction_id_3': 296734, 'operation_type_3': 2, 'end_transaction_id_3': 296734}]
I assume that the first error occurs because there are a lot variables x regions in that particular run.
Can you please take a look @meksor?
FYI @lisahligono
An upload to the iam-diagnostics-internal failed twice with strange error messages:
When trying to process that file again, the process again failed with the following error message:
I assume that the first error occurs because there are a lot variables x regions in that particular run.
Can you please take a look @meksor?
FYI @lisahligono