You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a document in SBOL2 I tried to convert it to SBOL3 using the function convert2to3 and it returned me an error.
The 3.0 is a valid displayid.
Here is the error:
File ~/Documents/GitHub/SBOL-utilities/sbol_utilities/conversion.py:105, in convert2to3(sbol2_doc, namespaces)
103 rdf_xml = convert_identities2to3(rdf_xml)
104 doc = sbol3.Document()
--> 105 doc.read_string(rdf_xml, sbol3.RDF_XML)
107 # TODO: remove workaround after conversion errors fixed in SynBioDex/sboljs3#14
108 # add in the missing namespace fields where possible, defaulting otherwise
109 # TODO: add check for non-TopLevel? See SynBioDex/pySBOL3#295
110 needs_namespace = {o for o in doc.objects if o.namespace is None}
File ~/opt/anaconda3/envs/LOICA/lib/python3.9/site-packages/sbol3/document.py:247, in Document._parse_graph(self, graph)
246 def _parse_graph(self, graph) -> None:
--> 247 objects = self._parse_objects(graph)
248 child_objects = self._parse_attributes(objects, graph)
249 self._clean_up_singletons(objects)
...
58 msg += ' A displayId MUST be composed of only alphanumeric'
59 msg += ' or underscore characters and MUST NOT begin with a digit.'
---> 60 raise ValueError(msg)
ValueError: "3.0" is not a valid displayId. A displayId MUST be composed of only alphanumeric or underscore characters and MUST NOT begin with a digit.
The text was updated successfully, but these errors were encountered:
Given the lack of response, I'm going to close this as likely no longer relevant. If you want to pursue it further, please answer the questions above and reopen.
I got a document in SBOL2 I tried to convert it to SBOL3 using the function convert2to3 and it returned me an error.
The 3.0 is a valid displayid.
Here is the error:
ValueError Traceback (most recent call last)
Cell In[7], line 1
----> 1 doc3 = convert2to3(doc2)
File ~/Documents/GitHub/SBOL-utilities/sbol_utilities/conversion.py:105, in convert2to3(sbol2_doc, namespaces)
103 rdf_xml = convert_identities2to3(rdf_xml)
104 doc = sbol3.Document()
--> 105 doc.read_string(rdf_xml, sbol3.RDF_XML)
107 # TODO: remove workaround after conversion errors fixed in SynBioDex/sboljs3#14
108 # add in the missing namespace fields where possible, defaulting otherwise
109 # TODO: add check for non-TopLevel? See SynBioDex/pySBOL3#295
110 needs_namespace = {o for o in doc.objects if o.namespace is None}
File ~/opt/anaconda3/envs/LOICA/lib/python3.9/site-packages/sbol3/document.py:334, in Document.read_string(self, data, file_format)
332 graph = rdflib.Graph()
333 graph.parse(data=data, format=file_format)
--> 334 return self._parse_graph(graph)
File ~/opt/anaconda3/envs/LOICA/lib/python3.9/site-packages/sbol3/document.py:247, in Document._parse_graph(self, graph)
246 def _parse_graph(self, graph) -> None:
--> 247 objects = self._parse_objects(graph)
248 child_objects = self._parse_attributes(objects, graph)
249 self._clean_up_singletons(objects)
...
58 msg += ' A displayId MUST be composed of only alphanumeric'
59 msg += ' or underscore characters and MUST NOT begin with a digit.'
---> 60 raise ValueError(msg)
ValueError: "3.0" is not a valid displayId. A displayId MUST be composed of only alphanumeric or underscore characters and MUST NOT begin with a digit.
The text was updated successfully, but these errors were encountered: