Skip to content

Unexpected error when writing a GribMessage keyΒ #662

@pp-mo

Description

@pp-mo

It is, by design, possible to modify the content of a GribMessage by assigning to a named key with a section,
e.g. message.section[4][keyname] = value

This appears to work as intended if you first read the key. For example :

sec4 = message.sections[4]
old_param = sec4["parameterNumber"]
sec4["parameterNumber"] = 17

But, if you attempt to write a key before reading it, you hit this exception.

I think this probably arose because the code intends to stop you unintentionally creating a key which is not 'native' to the template,
i.e. it wants to allow you to write only to keys which 'exist'.
But it looks like a bug, and could clearly be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions