Raúl, Thank you for reporting this.
Looks like a bug in the way that generateDS is generating your code. I'll take a look. I tried to reproduce the error that you report, but I could not. It must be a special or corner case of some kind. Would it be possible to send me a copy of your XML schema. Then I could generate a module, and reproduce your exception. Also, it would help me if I had an XML instance document that, when parsed and exported, produces this exception. Question -- What version of generateDS are you using. The version number should be in a comment near the top of the module that you generated. Thanks for your help. Dave On Mon, Apr 29, 2019 at 11:53:06AM +0200, Raúl Torres García wrote: > Hello Dave! > > I am Raul, an University Student from Madrid. I am doing my final degree > project and I am using your library GenerateDS. > I am writing to you to ask you a doubt. I have generated the python code > with my XML schema and I am trying to export some python data to a xml file. > When I execute my code, I get the next error: > " > Traceback (most recent call last): > File "telecomandos.py", line 4, in <module> > telecomandos = commands.sendTCs() > File "/home/rtorres/TFG/pruebaxml_29Abril_error/tc_sub.py", line 340, in > sendTCs > self.export(file,0) > File "/home/rtorres/TFG/pruebaxml_29Abril_error/TC_api.py", line 867, in > export > self.exportChildren(outfile, level + 1, namespaceprefix_, > namespacedef_, name_='commands', pretty_print=pretty_print) > File "/home/rtorres/TFG/pruebaxml_29Abril_error/TC_api.py", line 880, in > exportChildren > tc_.export(outfile, level, namespaceprefix_, namespacedef_='', > name_='tc', pretty_print=pretty_print) > File "/home/rtorres/TFG/pruebaxml_29Abril_error/TC_api.py", line 998, in > export > self.exportChildren(outfile, level + 1, namespaceprefix_, > namespacedef_, name_='tc', pretty_print=pretty_print) > File "/home/rtorres/TFG/pruebaxml_29Abril_error/TC_api.py", line 1023, in > exportChildren > self.change_adcs_calibration_parameters.export(outfile, level, > namespaceprefix_, namespacedef_='', > name_='change_adcs_calibration_parameters', pretty_print=pretty_print) > File "/home/rtorres/TFG/pruebaxml_29Abril_error/TC_api.py", line 1815, in > export > self.exportChildren(outfile, level + 1, namespaceprefix_, > namespacedef_, name_='change_adcs_calibration_parameters', > pretty_print=pretty_print) > File "/home/rtorres/TFG/pruebaxml_29Abril_error/TC_api.py", line 1829, in > exportChildren > self.calibration_parameters.export(outfile, level, namespaceprefix_, > namespacedef_='', name_='calibration_parameters', pretty_print=pretty_print) > File "/home/rtorres/TFG/pruebaxml_29Abril_error/TC_api.py", line 3061, in > export > self.exportChildren(outfile, level + 1, namespaceprefix_, > namespacedef_, name_='calibration_parameters', pretty_print=pretty_print) > File "/home/rtorres/TFG/pruebaxml_29Abril_error/TC_api.py", line 3076, in > exportChildren > self.cm_mm01.export(outfile, level, namespaceprefix_, namespacedef_='', > name_='cm_mm01', pretty_print=pretty_print) > AttributeError: 'float' object has no attribute 'export' > " > I don't know how to solve this AttributeError. The data which I am using in > the python code is Float type, so I don't know what is wrong. Could you > help me? > > Thank you so much for your time and sorry for the inconvenience! > Best regards! > -- > Raúl Torres García -- Dave Kuhlman http://www.davekuhlman.org _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users