Problems with python bindings

Antonio Roberts antonio at hellocatfood.com
Thu May 7 07:08:49 EDT 2015


Thanks, managed to fix it. It does mean that I'll have some issues
with foreign characters though... I'll contact the author.

Antonio

On 7 May 2015 at 01:57, John Ralls <jralls at ceridwen.us> wrote:
>
>> 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
>
>



-- 
============================
antonio at hellocatfood.com
http://www.hellocatfood.com
============================



More information about the gnucash-user mailing list