{"record":{"id":"e88a27c86778049a","repo":"lutzroeder/netron","slug":"unknown-field-tag-this-location-e88a27","errorCode":null,"errorMessage":"Unknown field '${tag}' ${this.location()}","messagePattern":"Unknown field '(.+?)' (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"source/paddle.js","lineNumber":107,"sourceCode":"                                reader.enum = function(type) {\n                                    const token = this.token();\n                                    this.next();\n                                    this.semicolon();\n                                    if (type[token] !== undefined) {\n                                        return type[token];\n                                    }\n                                    if (token === 'LOD_TENSOR') {\n                                        return type.DENSE_TENSOR;\n                                    }\n                                    throw new paddle.Error(`Unknown enum value '${token}' ${this.location()}`);\n                                };\n                                reader.field = function(tag, message) {\n                                    if (message instanceof paddle.proto.VarType && tag === 'lod_tensor') {\n                                        message.dense_tensor = paddle.proto.VarType.DenseTensorDesc.decodeText(reader);\n                                    } else if (message instanceof paddle.proto.VarType.DenseTensorDesc && tag === 'lod_level') {\n                                        message.legacy_lod_level = reader.int32();\n                                    } else {\n                                        throw new Error(`Unknown field '${tag}' ${this.location()}`);\n                                    }\n                                };\n                                program.desc = paddle.proto.ProgramDesc.decodeText(reader);\n                            } catch (error) {\n                                const message = error && error.message ? error.message : error.toString();\n                                throw new paddle.Error(`File text format is not paddle.ProgramDesc (${message.replace(/\\.$/, '')}).`);\n                            }\n                            break;\n                        }\n                        case 'paddle.pb': {\n                            try {\n                                const reader = await context.read('protobuf.binary');\n                                program.desc = paddle.proto.ProgramDesc.decode(reader);\n                            } catch (error) {\n                                const message = error && error.message ? error.message : error.toString();\n                                throw new paddle.Error(`File format is not paddle.ProgramDesc (${message.replace(/\\.$/, '')}).`);\n                            }\n                            break;","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/lutzroeder/netron/blob/d8a543f5f847ef596aa58858d6adcf5d75545f7f/source/paddle.js#L89-L125","documentation":"Thrown by the Paddle text-format (protobuf JSON/text) parser's permissive field hook: while decoding a paddle.ProgramDesc in text format, it encountered a field name it does not recognize on VarType/DenseTensorDesc messages. The hook only remaps legacy names (lod_tensor→dense_tensor, lod_level→legacy_lod_level); anything else is fatal and is wrapped into a paddle.Error reporting the text format is not a ProgramDesc.","triggerScenarios":"Loading a Paddle text-format .pbtxt model where a VarType contains a field other than the known ones — e.g. 'selected_rows', 'sparse_tensor', 'dense_tensor', or newer/older field names — triggering the reader.field fallback.","commonSituations":"PaddlePaddle version differences renaming VarType oneof fields, hand-edited pbtxt files, or feeding a binary .pb to the text parser (garbage field names).","solutions":["Ensure you are loading a text-format Paddle model with the correct parser (not binary parsed as text).","Check the unknown field name in the message (it is included in the error text) against the Paddle proto schema for your framework version.","Upgrade/downgrade this library to a version whose paddle.js knows the field, or extend the reader.field hook to map it."],"exampleFix":"// before\nreader.field = function(tag, message) {\n    if (message instanceof paddle.proto.VarType && tag === 'lod_tensor') { ... }\n    else throw new Error(`Unknown field '${tag}' ${this.location()}`);\n};\n\n// after — add mappings for additional legacy fields\nelse if (message instanceof paddle.proto.VarType && tag === 'selected_rows') {\n    message.selected_rows = paddle.proto.VarType.SelectedRowsDesc.decodeText(reader);\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    program.desc = paddle.proto.ProgramDesc.decodeText(reader);\n} catch (e) {\n    if (/Unknown field/.test(e.message)) {\n        throw new Error(`Unsupported Paddle text-format field: ${e.message}`);\n    }\n    throw e;\n}","preventionTips":["Match the library version to the PaddlePaddle version that produced the pbtxt.","Validate that input is text-format (ASCII) before routing it to decodeText.","Extend the reader.field hook when new VarType oneof fields appear in your models."],"tags":["paddle","paddlepaddle","text-format","protobuf","unknown-field"],"backgroundTag":"protobuf-unknown-field","analyzedSha":"d8a543f5f847ef596aa58858d6adcf5d75545f7f","analyzedAt":"2026-08-27T19:21:42.082Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}