Cannot update dictionary: ValueError: dictionary update sequence element #0 has length 1; 2 is required

124 views Asked by At

I am very new to python and I am currently using code not written by me for my work. The code I use gives me a dictionary called "net" and I have been told I need to update this dictionary before using its contents.

Not really sure what "update" does so if you have an explanation for that it would be appreciated.

Anyways, the code I use is called OpenPNM and pn below is of type "Network.GenericNetwork.GenericNetwork" which probably means nothing to anyone who doen't use OpenPNM.

So to update the dict I do:

pn.update('net')

and get the error: ValueError: dictionary update sequence element #0 has length 1; 2 is required

I understand this is vague but I don't know what else to add so just ask for any code I need to supply in order to get help!

Thanks in advance.

0

There are 0 answers