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.

On Thu, Oct 13, 2016 at 3:30 PM, Lev Israel <l...@sefaria.org> wrote:

> 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
> extended RTL character set), I would get this error (just the tail here):
>
>   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
> terminal branch of MixedContainer.export():
>
> I changed:
>             self.value.export(outfile, level, namespace, name,
> pretty_print)
>
> to:
>             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>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to