You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reporting this error. Which version of gnucash are you running? I used the script with my gnucahs 2.6.15 a month ago and it worked fine. Anyway I will try your fix after my vacations.
First off: I'm not exactly well-versed in Python or Gnucash databases, just a user with a very basic understanding of programming.
After a recent Gnucash update, gcinvoice.py started giving the following error, one per Gnucash database entry:
Traceback (most recent call last): File "gcinvoice.py", line 319, in parse ns('entry:entered/ts:date'))) File "gcinvoice.py", line 751, in _readdatetime "%Y-%m-%d %H:%M:%S") File "/usr/lib/python2.7/_strptime.py", line 332, in _strptime (data_string, format)) ValueError: time data '2016-10-15' does not match format '%Y-%m-%d %H:%M:%S' WARNING:gcinvoice:Problem parsing GncEntry [<ns0:GncEntry xmlns:ns0="http://www.gnucash.org/XML/gnc" xmlns:ns1="http://www.gnucash.org/XML/entry" xmlns:ns2="http://www.gnucash.org/XML/ts" version="2.0.0"> <ns1:guid type="guid">f9293a1ac3d24dbb848a2dcaa0e30d8d</ns1:guid> <ns1:date> <ns2:date>2018-03-30 10:00:00</ns2:date> </ns1:date> <ns1:entered> <ns2:date>2018-04-01 12:53:28</ns2:date> </ns1:entered> <ns1:description>Test entry</ns1:description> <ns1:qty>1000000/1000000</ns1:qty> <ns1:i-acct type="guid">ff7664ebca81a12de837157bb14d691b</ns1:i-acct> <ns1:i-price>100000000/1000000</ns1:i-price> <ns1:invoice type="guid">73fd48af7e3044f8bed13b19c1654b1f</ns1:invoice> <ns1:i-disc-type>PERCENT</ns1:i-disc-type> <ns1:i-disc-how>PRETAX</ns1:i-disc-how> <ns1:i-taxable>1</ns1:i-taxable> <ns1:i-taxincluded>1</ns1:i-taxincluded> <ns1:i-taxtable type="guid">75b9a59cf2d3edf16458febf919a50f1</ns1:i-taxtable> </ns0:GncEntry> ]
Editing gcinvoice.py and changing line 751 from
"%Y-%m-%d %H:%M:%S")
to
"%Y-%m-%d")
Resolved this error. I freely admit I found this out through trial-and-error. I imagine this would be nice to add to the main branch.
Thanks for the work on gcinvoice, it's been a great tool so far.
The text was updated successfully, but these errors were encountered: