Skip to content

Namespace assignment error that vanishes with dict comprehension #751

@elinscott

Description

@elinscott

I am trying to pass the following as an argument to a task:

TaggedValue({'Si': <UpfData[Si] (pk: 52)>}, socket=SocketDict(name='pseudos', value={'Si': <UpfData[Si] (pk: 52)>}), uuid=e5872445-6e1c-48f9-84c3-5137ceed216c)

but it gives a namespace assignment error (with the true error obscured due to a separate bug -- see scinode/node-graph#149)

Simply providing the dictionary as a comprehension makes the code work i.e.

pseudos = {k: v for k, v in pseudos.items() ✅ 
pseudos = pseudos  ❌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions