Error while compiling file #1568

tzulberti-jampp opened this Issue Dec 28, 2016 · 0 comments


None yet

1 participant


I have the following

class A(object):

    class B(Exception):

    def foobar(self):
        print 'foobar'

And I have the following foo.pxd

cdef class A:

When I do python develop, I got the following error:

Exception AttributeError: "'NoneType' object has no attribute 'is_anonymous'" in 'Cython.Compiler.FlowControl.ControlFlow.is_tracked' ignored

After building cython with the --no-cython-compile flag, I got the following information when running
python develop

Compiling because it changed.
[1/1] Cythonizing

Error compiling Cython file:

class A(object):

    class B(Exception):
------------------------------------------------------------ Compiler crash in ControlFlowAnalysis

ModuleNode.body = StatListNode(
CClassDefNode.body = StatListNode(

Compiler crash traceback from this point on:
  File "/home/tzulberti/workspace/cython/Cython/Compiler/", line 180, in _visit
    return handler_method(obj)
  File "/home/tzulberti/workspace/cython/Cython/Compiler/", line 1307, in visit_PyClassDefNode
  File "/home/tzulberti/workspace/cython/Cython/Compiler/", line 174, in mark_assignment
    if self.block and self.is_tracked(entry):
  File "/home/tzulberti/workspace/cython/Cython/Compiler/", line 152, in is_tracked
    if entry.is_anonymous:
AttributeError: 'NoneType' object has no attribute 'is_anonymous'
Traceback (most recent call last):
  File "", line 22, in <module>
    ext_modules = cythonize(ext_modules)
  File "/home/tzulberti/workspace/cython/Cython/Build/", line 935, in cythonize
  File "/home/tzulberti/workspace/cython/Cython/Build/", line 1057, in cythonize_one
    raise CompileError(None, pyx_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment