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

Thinker thinker at branda.to
Mon Feb 26 12:19:02 EST 2007


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

zefciu wrote:
> Thinker wrote:
>
>> It should be "PyObject *coord;" . Maybe, it is what is wrong with
>> your program!
>>
>>
> Should it? The gcc shows me a warning then:
>
> warning: 'coord' is used uninitialized in this function
>
> and during the execution I get the same error *plus* a segfault.
>
> zefciu
Yes! Please refer http://docs.python.org/api/arg-parsing.html#l2h-210
And your second PyArg_ParseTuple() call, should not make a reference
on coord.
It should be PyArg_ParseTuple(coord, ...) since you declare coord as a
pointer.
You can add some printf() to throw out messages to make sure where the
program stop at.
If you can compile the module with debug information and use gdb to
backtrace dump file,
it would be useful.

- --
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

iD8DBQFF4xaG1LDUVnWfY8gRAsW7AKC7D3oZ8p8iWVFcBvkiVwMSrG1oNwCg36ym
e1Fa0AO3KzSD5FcYs0LK7P4=
=kYLW
-----END PGP SIGNATURE-----




More information about the Python-list mailing list