Python bindings: Account.getName() raises TypeError

Felix Schwarz at
Sun Mar 16 15:54:10 EDT 2014

Am 16.03.2014 20:38, schrieb John Ralls:
> The signature of xaccAccountGetName is const char* xaccAccountGetName (const Account *); the const was added in 2005. A "const Account *" is not the same as an "Account const *": The former means that the contents of the pointer won't change, the latter means that the pointer itself won't change (see
> Somewhere in the SWIG-generated Python-to-C translation code the argument type is wrong, but it's not directly in the stack trace from Python. It's more likely due to a change in SWIG than to a change in GnuCash.

Thank you very much for the insights - seems really easy to miss. I'll take a
look at the SWIG files and the generated code then.

But that means it would be interesting if gnucash's example script
"" works for anyone, right? If we had a
success report this might provide some insight about the relevant swig changes.


More information about the gnucash-devel mailing list