cython: Question: odd error, disappears on second run: AssertionError: PyTypeTest on non extension type
Does anyone know if there is some reason I would get AssertionError: PyTypeTest on non extension type, like what sort of coding error (on my end) would cause that? Strangely enough it goes away when I run cythonize again, but on first cythonize on the first setup.py install I always see it, and I’m not sure if it’s my fault or not
Edit: here’s the full compiler trace:
Compiler crash traceback from this point on:
File "Cython/Compiler/Visitor.py", line 180, in Cython.Compiler.Visitor.TreeVisitor._visit
File "/home/e/.local/lib/python3.6/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 2211, in visit_FuncDefNode
node.body = node.body.analyse_expressions(node.local_scope)
File "/home/e/.local/lib/python3.6/site-packages/Cython/Compiler/Nodes.py", line 436, in analyse_expressions
for stat in self.stats]
File "/home/e/.local/lib/python3.6/site-packages/Cython/Compiler/Nodes.py", line 436, in <listcomp>
for stat in self.stats]
File "/home/e/.local/lib/python3.6/site-packages/Cython/Compiler/Nodes.py", line 6672, in analyse_expressions
self.item = self.item.coerce_to(self.target.type, env)
File "/home/e/.local/lib/python3.6/site-packages/Cython/Compiler/ExprNodes.py", line 949, in coerce_to
src = PyTypeTestNode(src, dst_type, env)
File "/home/e/.local/lib/python3.6/site-packages/Cython/Compiler/ExprNodes.py", line 12965, in __init__
assert dst_type.is_extension_type or dst_type.is_builtin_type, "PyTypeTest on non extension type"
AssertionError: PyTypeTest on non extension type
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 23 (8 by maintainers)
@guyskk that looks like a real bug but it’s nothing to do with the issue you’ve posted it on. It should be fixed in the next release though https://github.com/cython/cython/commit/f6edb652db32e12505be8bc4767e64b50790f378