[C++-sig] embedding python: PyGrammar_FindDFA error

Thomas Hrabe thrabe at burnham.org
Fri May 23 01:12:40 CEST 2008


Hi all,

I am experiencing an error with mz embedded python C program.

I create an object in python, but can not retrieve it correctly.

My code:


PyObject *f_globals = PyModule_GetDict(mainModule);
PyRun_SimpleString("a = 1");
PyObject* o = PyRun_String("a",0, f_globals, f_globals);

The error:

Assertion failed: (d->d_type == type), function PyGrammar_FindDFA, file Parser/grammar1.c, line 18.


Python is initialised and everything.
Does anybody know what this means. I assume that I do not call PyRun_String correctly.

By the way, its osX Leopard, python 2.5

Does anybody have a clue?

Best,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20080522/db146e40/attachment.htm>


More information about the Cplusplus-sig mailing list