Message346992
The bug can be reproduced on the master branch of Python. I tested with versions:
* lxml 4.3.4
* xmlsec 1.3.3
The filename comes from a lxml.etree.XMLSyntaxError exception which inherits from SyntaxError. The bug can be reproduced without lxml nor xmlsec, just with attached excepthook_syntaxerror.py:
$ ./python excepthook_syntaxerror.py
Traceback (most recent call last):
File "/home/vstinner/prog/python/master/excepthook_syntaxerror.py", line 3, in <module>
raise SyntaxError("msg", (b"bytes_filename", 123, 0, "text"))
Objects/unicodeobject.c:492: _PyUnicode_CheckConsistency: Assertion "((((((PyObject*)(op))->ob_type))->tp_flags & ((1UL << 28))) != 0)" failed
Enable tracemalloc to get the memory block allocation traceback
object : b'bytes_filename'
type : bytes
refcount: 4
address : 0x7fe22fe7ce50
Fatal Python error: _PyObject_AssertFailed
Current thread 0x00007fe23cfbf740 (most recent call first):
File "/home/vstinner/prog/python/master/excepthook_syntaxerror.py", line 5 in <module>
Aborted (core dumped)
excepthook_syntaxerror.py uses:
raise SyntaxError("msg", (b"bytes_filename", 123, 0, "text")) |
|
Date |
User |
Action |
Args |
2019-07-01 10:15:06 | vstinner | set | recipients:
+ vstinner |
2019-07-01 10:15:06 | vstinner | set | messageid: <1561976106.06.0.0411152988485.issue37467@roundup.psfhosted.org> |
2019-07-01 10:15:05 | vstinner | link | issue37467 messages |
2019-07-01 10:15:05 | vstinner | create | |
|