Hi,

I am trying the new C++ syntax. I got the following error (all files attached):

$ cython _hermes_common.pyx
Traceback (most recent call last):
  File "/home/ondrej/usr/bin/cython", line 8, in <module>
    main(command_line = 1)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Main.py", line 749, in main
    result = compile(sources, options)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Main.py", line
724, in compile
    return compile_multiple(source, options)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Main.py", line
696, in compile_multiple
    result = run_pipeline(source, options)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Main.py", line
567, in run_pipeline
    err, enddata = context.run_pipeline(pipeline, source)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Main.py", line
224, in run_pipeline
    data = phase(data)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Main.py", line 524, in parse
    scope = context.find_module(full_module_name, pos = initial_pos,
need_pxd = 0)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Main.py", line
297, in find_module
    err, result = self.process_pxd(source_desc, scope, module_name)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Main.py", line
209, in process_pxd
    result = self.run_pipeline(pipeline, source_desc)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Main.py", line
224, in run_pipeline
    data = phase(data)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/ParseTreeTransforms.py",
line 960, in __call__
    return super(AnalyseDeclarationsTransform, self).__call__(root)
  File "Visitor.py", line 276, in
Cython.Compiler.Visitor.CythonTransform.__call__
(Cython/Compiler/Visitor.c:4972)
  File "Visitor.py", line 259, in
Cython.Compiler.Visitor.VisitorTransform.__call__
(Cython/Compiler/Visitor.c:4732)
  File "Visitor.py", line 28, in
Cython.Compiler.Visitor.BasicVisitor.visit
(Cython/Compiler/Visitor.c:1187)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/ParseTreeTransforms.py",
line 968, in visit_ModuleNode
    node.analyse_declarations(self.env_stack[-1])
  File "/home/ondrej/usr/lib/python/Cython/Compiler/ModuleNode.py",
line 63, in analyse_declarations
    self.body.analyse_declarations(env)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Nodes.py", line
341, in analyse_declarations
    stat.analyse_declarations(env)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Nodes.py", line
396, in analyse_declarations
    self.body.analyse_declarations(env)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Nodes.py", line
341, in analyse_declarations
    stat.analyse_declarations(env)
  File "/home/ondrej/usr/lib/python/Cython/Compiler/Nodes.py", line
1029, in analyse_declarations
    if len(self.attributes) != 0:
TypeError: object of type 'NoneType' has no len()




It's some mistake in the file, but I don't know where, when cython
exits with an exception.

Ondrej

Attachment: _hermes_common.pxd
Description: Binary data

Attachment: _hermes_common.pyx
Description: Binary data

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to