Problems with python bindings
John Ralls
jralls at ceridwen.us
Wed May 6 20:57:30 EDT 2015
> On May 6, 2015, at 3:22 PM, Antonio Roberts <antonio at hellocatfood.com> wrote:
>
> I'm attempting to use Jeff's Useful GnuCash Utilities to generate
> invoices from gnucash. https://github.com/n1ywb/jeffs-gnucash-utils
>
> For invoices up to 000009 I can generate them without problem.
> However, 000010 generates this error. I'm using gnucash 2.6.6 on
> Ubuntu 15.04:
>
> * 14:35:21 WARN <gnc.backend.dbi> [gnc_module_init_backend_dbi()] No
> DBD drivers found
>
>
> Traceback (most recent call last):
> File "invoice.py", line 186, in main
> t.render(invoice=invoice)
> File "/usr/lib/python2.7/dist-packages/mako/template.py", line 443, in render
> return runtime._render(self, self.callable_, args, data)
> File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 803, in _render
> **_kwargs_for_callable(callable_, data))
> File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 835,
> in _render_context
> _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
> File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 860,
> in _exec_template
> callable_(context, *args, **kwargs)
> File "templates/invoice.html", line 84, in render_body
> ${invoice.customer.name}<br>
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> 1: ordinal not in range(128)
>
> Traceback (most recent call last):
> File "invoice.py", line 196, in <module>
> sys.exit(main())
> File "invoice.py", line 186, in main
> t.render(invoice=invoice)
> File "/usr/lib/python2.7/dist-packages/mako/template.py", line 443, in render
> return runtime._render(self, self.callable_, args, data)
> File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 803, in _render
> **_kwargs_for_callable(callable_, data))
> File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 835,
> in _render_context
> _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
> File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 860,
> in _exec_template
> callable_(context, *args, **kwargs)
> File "templates_invoice_html", line 71, in render_body
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> 1: ordinal not in range(128)
>
>
> I'm aware that this could be a problem with the script itself, but is
> this something related to gnucash? I've also submitted a bug report
> but any advice/fixes here is appreciated.
>
That’s from trying to feed a non-ascii character, Ã in this case, to something that expects ascii. Not a GnuCash issue, sorry. You’ll have to try to get support from the author of the author of the utilities.
Regards,
John Ralls
More information about the gnucash-user
mailing list