gcinvoice: non-numeric invoice id

Robert Heller heller at deepsoft.com
Thu May 29 08:31:36 EDT 2008


At Wed, 28 May 2008 22:32:46 -0700 "Ian Smith-Heisters" <i at idiosyncra.tc> wrote:

> 
> Hi all,
> 
> I code my invoices by project code and a numeric index, eg. BEE-1,
> BEE-2. GnuCash works fine with this, but gcinvoice barfs:
> 
> ---
> Traceback (most recent call last):
>   File "/usr/bin/gcinvoice.py", line 252, in parse
>     invoiceentries = self.invoices_[invoiceguid]['entries']
> KeyError: '268531cf5cde3b9de8bb30a5bc721129'
> Traceback (most recent call last):
>   File "/usr/bin/gcinvoice.py", line 902, in <module>
>     outfile=getattr(options, 'outfile', None), options=options)
>   File "/usr/bin/gcinvoice.py", line 874, in createInvoice
>     gc.createInvoice(invoicenum, template=template, outfile=outfile)
>   File "/usr/bin/gcinvoice.py", line 350, in createInvoice
>     invoicenum = int(invoicenum)
> ValueError: invalid literal for int() with base 10: 'BEE-1'
> ---
> 
> Just wondering if there's some other numeric id I should be using, or
> if anyone knows of a workaround?

Sounds like a bug in gcinvoice -- an object type assumption mismatch --
the gcinvoice code is assuming invoice ids are integers and it using
them as integer array indexes, while GnuCash itself is not typing
invoice ids as integers.  gcinvoice probably should NOT be making this
assumption. 

> 
> Thanks,
> Ian
> _______________________________________________
> 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.
> 
>           

-- 
Robert Heller             -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software        -- Linux Installation and Administration
http://www.deepsoft.com/  -- Web Hosting, with CGI and Database
heller at deepsoft.com       -- Contract Programming: C/C++, Tcl/Tk
                


More information about the gnucash-user mailing list