SystemError: new style getargs format but argument is not a tuple

Thinker thinker at branda.to
Mon Feb 26 11:55:16 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zefciu wrote:
> I am trying to embed a c function in my python script for a first
> time. When I try to call it I get an error
>
> SystemError: new style getargs format but argument is not a tuple
>
> Guido said on some mailing list, that it is probably an effect of
> the lack of METH_VARARGS in the functions' array, but it's ok in my
> source code. Here is the full code:
>
> #include <python2.4/Python.h>
>
> static PyObject * mandelpixel(PyObject *self, PyObject *args) {
> double z_real = 0, z_imag = 0, z_real2 = 0, z_imag2 = 0, c_real,
> c_imag, bailoutsquare; int iteration_number; register int i;
> PyObject coord;
It should be "PyObject *coord;" .
Maybe, it is what is wrong with your program!

- --
Thinker Li - thinker at branda.to thinker.li at gmail.com
http://heaven.branda.to/~thinker/GinGin_CGI.py
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF4xDz1LDUVnWfY8gRAmAAAJ9FJPqGyeI0InxrcvdNXHtGMXWK1wCg570r
z3hcYDsjmqRp4BnpEFjbDy0=
=REQM
-----END PGP SIGNATURE-----




More information about the Python-list mailing list