The root of the error is not obvious in this situation, but it turned out to be that the source field was originally a node, but was overwritten by a 'source' column in the original data. Renaming the edge column to 'origin' fixed the error.
This kind of error is problematic, because the Cytoscape JS reader should have sent an exception explicitly saying that the source was invalid, and CyREST should have passed that on (now possible in #79).
When accessing Cytoscape from Python 3 using py2cytoscape, one of our users had a script that sent invalid Cytoscape JS json:
This was sent to
POST /v1/networks
, and resulted in this:The root of the error is not obvious in this situation, but it turned out to be that the
source
field was originally a node, but was overwritten by a 'source' column in the original data. Renaming the edge column to 'origin' fixed the error.This kind of error is problematic, because the Cytoscape JS reader should have sent an exception explicitly saying that the source was invalid, and CyREST should have passed that on (now possible in #79).