Closed ariutta closed 3 years ago
Maybe related to #70?
So Ndex2.set_network_properties()
in version 3.3.1
needs some TLC. The documentation is lacking big time.
First, the format of each property needs to be a dict
:
{
"subNetworkId": "",
"predicateString": "",
"dataType": "",
"value": ""
}
Then the above dict
must be put in a list.
Format for above is from: http://openapi.ndextools.org/#/Network/put_network__networkid__properties
The dataType
must be one of the following:
https://ndex2.readthedocs.io/en/latest/ndex2.html?highlight=list_of_string#supported-data-types
Here is an example on how to replace network properties on a network for version 3.3.1
:
# network_id is NDEx UUID of network
foo = [{'subNetworkId': '',
'predicateString': 'dummyProperty',
'dataType': 'string',
'value': 'dummy value'
}]
my_ndex.set_network_properties(network_id, foo)
hope this helps,
chris
Thanks, Chris. This appears to be working now.
Updated documentation in 3.3.2 release
The
set_network_properties
method is giving me an unexpected error:I am using version
3.3.1
of this library.I can successfully run other methods like
set_network_system_properties
andset_read_only
. In fact, if I comment out theset_network_properties
line in the code below, it runs OK. But with that line enabled, I get the error.Code
Error