Problems with python bindings

Antonio Roberts antonio at hellocatfood.com
Thu May 7 08:54:48 EDT 2015


Hi C. Holtermann,

Thanks for the offer. I know very little python so that would be very
helpful. If possible, could you post your fix to the issue tracker
https://github.com/n1ywb/jeffs-gnucash-utils/issues/7

On 7 May 2015 at 12:41, c.holtermann <c.holtermann at gmx.de> wrote:
> That's quite easy to fix. In some days I could answer if you don't have it by then. Just now I lack the time.
>
> Regards,
>
> C. Holtermann
>
> Antonio Roberts <antonio at hellocatfood.com> schrieb:
>
>>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
>>============================
>>
>>_______________________________________________
>>gnucash-user mailing list
>>gnucash-user at gnucash.org
>>https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>-----
>>Please remember to CC this list on all your replies.
>>You can do this by using Reply-To-List or Reply-All.



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



More information about the gnucash-user mailing list