Problems with python bindings

Christoph Holtermann c.holtermann at gmx.de
Mon May 11 06:03:49 EDT 2015


Hello,

I just realized, that it's another project for the same goal as mine.
As you say it's https://github.com/n1ywb/jeffs-gnucash-utils. I
have difficulties to get it working but the string encoding issues
had been the same for my approach http://svn.gnucash.org/docs/HEAD/gncinvoice__jinja_8py.html.
I'll try to get it working.

regards,

Christoph Holtermann


Am 07.05.2015 um 14:54 schrieb Antonio Roberts:
> 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.
>
>


-- 
--- Nachricht gesendet von C. Holtermann ---
-                                          -
-  Verschlüsselte Nachrichten können über  -
- den öffentlichen Schlüssel auf folgendem -
- Keyserver an mich gesendet werden:       -
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x4DD9CF0482B0620B





More information about the gnucash-user mailing list