daniel-de-vries / OpenLEGO

Open-source Link between AGILE and OpenMDAO
Apache License 2.0
6 stars 7 forks source link

AbstractDiscipline deploy failing #10

Closed jbussemaker closed 6 years ago

jbussemaker commented 6 years ago

Tested with Anaconda Python 3.6.

When running the Sellar test problem, the AbstractDiscipline deploy function is failing because the XML files are opened in w-mode while the etree.tostring methods as used by the Sellar problem disciplines are returning byte arrays.

The reason for this is a well-known Python bug (or can we call it a feature?): https://bugs.python.org/issue10942 https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.tostring

Suggest to resolve it by writing a new XML-utils function that makes sure that the output of etree.tostring always is of string type.

daniel-de-vries commented 6 years ago

Does this issue also occur with Python 2.7?

jbussemaker commented 6 years ago

No it does not

daniel-de-vries commented 6 years ago

Since OpenLEGO depends on kadmos, which targets only Python 2.7, I think the best way to move forward is to change OpenLEGO's target to only support Python 2.7 as well. This would resolve this issue.

daniel-de-vries commented 6 years ago

Target Python 3.6 removed from setup.py. Closing this issue.