Open tityrus opened 6 years ago
@tityrus, can you provide an example template file and a script that renders it and raises the problem?
@lsaffre OK after some further testing this error doesn't occur when run from a standalone module or from a Django management command.
To test I was quickly trying this inside the web process in some test view.
Either way the idea is to have this process async, so it seems the functional problem is solved :)
Still wondering though why this error pops up from within a web instance.
Hi, I have exactly the same problem. Anyone know why?
Django Version: 2.2.5 Python Version: 3.6.8
Traceback:
File "/usr/lib/python3.6/xml/sax/expatreader.py" in parse
File "/usr/lib/python3.6/xml/sax/xmlreader.py" in parse
File "/usr/lib/python3.6/xml/sax/expatreader.py" in feed
File "../Modules/pyexpat.c" in StartElement
File "/usr/lib/python3.6/xml/sax/expatreader.py" in start_element
File "/opt/aa/bb/venv/lib/python3.6/site-packages/appy/pod/pod_parser.py" in startElement
File "/opt/aa/bb/venv/lib/python3.6/site-packages/appy/pod/buffers.py" in dumpStartElement
File "/opt/aa/bb/venv/lib/python3.6/site-packages/appy/pod/buffers.py" in write
Exception Type: UnicodeEncodeError at /cc/cc/x/y Exception Value: 'ascii' codec can't encode character '\xe0' in position 29: ordinal not in range(128)
Has anyone else had issues with unicode chars in the LibreOffice document? Mine fails over a ³ for example:
Traceback:
File "/home/joris/Projects/CerCon/env/lib/python3.5/site-packages/appy/pod/renderer.py", line 451, in run self.currentParser.parse(self.contentXml) File "/home/joris/Projects/CerCon/env/lib/python3.5/site-packages/appy/xml/init.py", line 273, in parse self.parser.parse(inputSource) File "/usr/lib/python3.5/xml/sax/expatreader.py", line 110, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python3.5/xml/sax/xmlreader.py", line 125, in parse self.feed(buffer) File "/usr/lib/python3.5/xml/sax/expatreader.py", line 210, in feed self._parser.Parse(data, isFinal) File "../Modules/pyexpat.c", line 468, in EndElement File "/usr/lib/python3.5/xml/sax/expatreader.py", line 325, in end_element self._cont_handler.endElement(name) File "/home/joris/Projects/CerCon/env/lib/python3.5/site-packages/appy/pod/pod_parser.py", line 319, in endElement e.currentBuffer.transferAllContent() File "/home/joris/Projects/CerCon/env/lib/python3.5/site-packages/appy/pod/buffers.py", line 384, in transferAllContent self.evaluate(self.parent, self.env.context) File "/home/joris/Projects/CerCon/env/lib/python3.5/site-packages/appy/pod/buffers.py", line 753, in evaluate result.write(self.content[currentIndex:index]) File "/home/joris/Projects/CerCon/env/lib/python3.5/site-packages/appy/pod/buffers.py", line 215, in write self.content.write(something) UnicodeEncodeError: 'ascii' codec can't encode character '\xb3' in position 2: ordinal not in range(128)