E-PE0010 — Out-of-scope variable reference in serialized model

Error Type

Protobuf Error

Phase

loading a model via protobuf (from_protobuf)

Python exception

jijmodeling.ProtobufError

Message

A variable reference in the serialized model is not bound by any enclosing scope.

The serialized model is corrupted or was produced by an incompatible JijModeling version.

Cause

While deserializing, JijModeling found an expression that refers to a variable of an enclosing construct (such as a comprehension or summation index) that does not actually enclose it, or that provides fewer variables than the reference asks for. A correctly serialized model can never contain such a reference, so the bytes are corrupted, were truncated, or were produced by a JijModeling version whose serialization format is incompatible with the one you are using.

Fix

Re-export the model with the same (or a compatible) JijModeling version as the one used to load it, and make sure the bytes are transferred and stored without modification (e.g. binary mode, no re-encoding). If the source model is available, serialize it again with your current JijModeling installation.