On Thu, Feb 24, 2011 at 8:52 PM, Robert Miller <rlmills...@gmail.com> wrote:
> I'm working on wrapping a C package in Cython for use in Sage, and I'm
> having some trouble. I think the problem has to do with the fact that
> the C program uses stderr to report issues. When the program exits, I
> get the following message:
>
> SystemError: error return without exception set
>
> I've looked around online, and found a lot of posts about this issue
> for specific C packages, where someone is trying to use the C API to
> wrap some C package in Python. But none of the solutions I found
> seemed relevant. I also looked in the Cython documentation, but it
> doesn't have quite enough information to help. (Please prove me wrong
> by posting a link!)
>
> When the code is run, it doesn't seem to go down a path which actually
> uses stderr, but it does successfully use stdout to report its result,
> before raising the error. It does make it all the way to the "return
> 0;" line, but doesn't seem to actually return to the Cython function
> I'm calling it from. Also, I can't use try/except to catch the
> SystemError.

This usually means you're returning NULL for an object, or perhaps an
error code for a special method (without setting an error). Perhaps
some code would be helpful?

- Robert

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to