Error calling Python API's

John Ralls jralls at
Fri Feb 22 22:56:20 EST 2013

On Feb 22, 2013, at 6:37 PM, James Nylen <jnylen+gnucash at> wrote:

> On Thu, Feb 21, 2013 at 11:33 PM, John Ralls <jralls at> wrote:
> It's not python logging, it's GLib logging. It's not a python program, either, nor has any effort been made to make it pythonic.
> You'll need to use the C api documentation [1] to understand the program.
> I played around with that some, and still couldn't get it to display any extra messages.  I don't think I can be of much help without more detailed instructions.  For example, is there a specific code change I can make and recompile to enable full logging to somewhere?
> For now, I'll just remove the call to since it is not necessary.

Please remember to copy the list on all replies: Use "Reply All" or, if your mailer supports it, "Reply List".

The function you need is qof_log_set_level (QofLogModule *module,  QofLogLevel loglevel).

It seems likely that the problem is that there aren't protections in the sql backend from "save" getting called on a clean book
(which, as Derek pointed out, is almost always the case with the sql backend because it saves on commit) and it's firing off
an empty sql string in response. That's a bit sloppy, but nothing of great concern.

John Ralls

More information about the gnucash-devel mailing list