-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better Debugging output? #120
Comments
another debugging output that would be useful: I had a variable called %VAR_show_foo% but i accidentally named the column has_foo. it would be nice if variables that were asked for and not supplied were collated for output, like |
I like the idea to gather unreplaced variables.
|
I don't know python well, but from a design standpoint i think it might be better to separately record: This provides flexibility in how they are reported. For instance, the normal output might just say how many names were used in the template and not supplied; the debugging output could say what names were requested and not supplied; and the verbose output could say, if anything was not supplied, what names were in the data that weren't used by the template. (e.g., "No data provided for %VAR_quux%, %VAR_fooBar%. Unused columns include: count, foo-bar, fooBaz, quuux.") That said, looking at your sample code, the |
Trying to use ScribusGeneratorCLI, I got the following opaque error message (snippet shows last non-error output as well):
15:10:31 - ScribusGenerator - INFO: source document consumes 9 data record(s). 15:10:32 - ScribusGenerator - ERROR: error: Traceback (most recent call last): File "/Applications/Scribus.app/Contents/share/scribus/scripts/ScribusGenerator-master/ScribusGeneratorCLI.py", line 148, in <module> generator.run() File "/Applications/Scribus.app/Contents/share/scribus/scripts/ScribusGenerator-master/ScribusGeneratorBackend.py", line 170, in run outputElt = ET.fromstring(outContent) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML parser.feed(text) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err ParseError: not well-formed (invalid token): line 1, column 113456
The cause was the same as #80 (needs XML escaping) but figuring that out was not trivial because the output doesn't tell me what it's about to try to do.
.
The text was updated successfully, but these errors were encountered: