Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The following code causes mysterious exceptions #592

Closed
robertwb opened this issue Aug 2, 2008 · 2 comments
Closed

The following code causes mysterious exceptions #592

robertwb opened this issue Aug 2, 2008 · 2 comments

Comments

@robertwb
Copy link
Contributor

robertwb commented Aug 2, 2008

Consider:

cdef PyObject* fast_tp_alloc(RichPyTypeObject *t, Py_ssize_t):

This gives the following traceback

Traceback (most recent call last):
  File "/home/gfurnish/sage-3.0.6/local/bin/cython", line 8, in <module>
    main(command_line = 1)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 527, in main
    result = compile(sources, options)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 505, in compile
    return compile_multiple(source, options)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 472, in compile_multiple
    result = context.compile(source, options)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Main.py", line 327, in compile
    tree.process_implementation(scope, options, result)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 48, in process_implementation
    self.analyse_declarations(env)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/ModuleNode.py", line 45, in analyse_declarations
    self.body.analyse_declarations(env)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 242, in analyse_declarations
    stat.analyse_declarations(env)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 986, in analyse_declarations
    name_declarator, type = self.declarator.analyse(base_type, env, self.body is not None)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 382, in analyse
    return self.base.analyse(ptr_type, env, nonempty = nonempty)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 434, in analyse
    name_declarator, type = arg_node.analyse(env, nonempty = nonempty)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 531, in analyse
    return self.declarator.analyse(base_type, env, nonempty = nonempty)
  File "/home/gfurnish/sage-3.0.6/local/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 344, in analyse
    self.name = base_type.name
AttributeError: CPySSizeTType instance has no attribute 'name'

This should give a more user friendly error.

Migrated from http://trac.cython.org/ticket/35

@robertwb
Copy link
Contributor Author

robertwb commented Aug 3, 2008

@robertwb changed resolution to fixed
status from new to closed
commented

See http://hg.cython.org/cython-devel/rev/7a1defb8455d

@robertwb robertwb closed this as completed Aug 3, 2008
@robertwb
Copy link
Contributor Author

@robertwb changed milestone to 0.9.8.1
commented

@robertwb robertwb added this to the 0.9.8.1 milestone Aug 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant