Open bartneck opened 4 months ago
Could you check the filename for the write as that file doesn't exist in your testing folder python is also misspelled (phyton) so that could also be an issue
The output file does not exist. Python fails to write it. Here is a screenshot of the program and the error.
I had added the <layoutWidth>
element and the python code does not yet know about it and the transformation fails.
import swiML
swiML.writeXML('importExportTest/JasiMasters2024032401-rewrite.xml',swiML.readXML('importExportTest/JasiMasters2024032401.xml'))
When running the program seen above, it also changes the XML file that was read. It removes all of the meta data. Here is the original XML:
<?xml version="1.0" encoding="UTF-8"?>
<program xmlns="https://github.com/bartneck/swiML"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/bartneck/swiML/version/2/2.1 https://raw.githubusercontent.com/bartneck/swiML/main/swiML.xsd">
and here it is after it was read.
<?xml version="1.0" encoding="UTF-8"?>
<program>
This is NOT the file that was written. It also changes the XML file that is read. This should of course not happen.
I wrote a very simple program to test the import/export function
import-export-test-01.py
:I get many errors when running this script. The XML is valid swiML.