Lev Israel
2016-10-13 12:42:33 UTC
Sorry - the corrected code should be:
self.value.export(outfile, level, namespace, name,
pretty_print=pretty_print)
The positional arguments were in the right order, it was only the absence
of a namespacedef_ and/or passing pretty_print as a positional argument
that was troublesome here.
self.value.export(outfile, level, namespace, name,
pretty_print=pretty_print)
The positional arguments were in the right order, it was only the absence
of a namespacedef_ and/or passing pretty_print as a positional argument
that was troublesome here.
The attached python file was generated from the attached XSD using version
2.23a.
I found that in trying to parse the attached XML (I apologize for the
File "/Users/levisrael/sefaria/Sefaria-Data/sources/Mesechtot
Ketanot/DCXML.py", line 2034, in exportChildren
item_.export(outfile, level, item_.name, namespace_,
pretty_print=pretty_print)
File "/Users/levisrael/sefaria/Sefaria-Data/sources/Mesechtot
Ketanot/DCXML.py", line 545, in export
self.value.export(outfile, level, namespace, name, pretty_print)
File "/Users/levisrael/sefaria/Sefaria-Data/sources/Mesechtot
Ketanot/DCXML.py", line 2123, in export
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' +
namespacedef_ or '', ))
TypeError: cannot concatenate 'str' and 'bool' objects
In looking at the code, it looks like there's a signature mismatch in the
self.value.export(outfile, level, namespace, name,
pretty_print)
self.value.export(outfile, level, name, namespace,
pretty_print=pretty_print)
And the error seems to be solved.
Did I find a bug here, or am I lost in the weeds?
--
Lev Israel
Software Architect
SEFARIA <http://www.sefaria.org/>
+972-54-239-1852
Twitter <https://twitter.com/sefariaproject>
Facebook <http://www.facebook.com/sefaria.org>
2.23a.
I found that in trying to parse the attached XML (I apologize for the
File "/Users/levisrael/sefaria/Sefaria-Data/sources/Mesechtot
Ketanot/DCXML.py", line 2034, in exportChildren
item_.export(outfile, level, item_.name, namespace_,
pretty_print=pretty_print)
File "/Users/levisrael/sefaria/Sefaria-Data/sources/Mesechtot
Ketanot/DCXML.py", line 545, in export
self.value.export(outfile, level, namespace, name, pretty_print)
File "/Users/levisrael/sefaria/Sefaria-Data/sources/Mesechtot
Ketanot/DCXML.py", line 2123, in export
outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' +
namespacedef_ or '', ))
TypeError: cannot concatenate 'str' and 'bool' objects
In looking at the code, it looks like there's a signature mismatch in the
self.value.export(outfile, level, namespace, name,
pretty_print)
self.value.export(outfile, level, name, namespace,
pretty_print=pretty_print)
And the error seems to be solved.
Did I find a bug here, or am I lost in the weeds?
--
Lev Israel
Software Architect
SEFARIA <http://www.sefaria.org/>
+972-54-239-1852
Twitter <https://twitter.com/sefariaproject>
Facebook <http://www.facebook.com/sefaria.org>
--
Lev Israel
Software Architect
SEFARIA <http://www.sefaria.org/>
+972-54-239-1852
Twitter <https://twitter.com/sefariaproject>
Facebook <http://www.facebook.com/sefaria.org>
Lev Israel
Software Architect
SEFARIA <http://www.sefaria.org/>
+972-54-239-1852
Twitter <https://twitter.com/sefariaproject>
Facebook <http://www.facebook.com/sefaria.org>