gcinvoice: non-numeric invoice id

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gcinvoice: non-numeric invoice id

Ian Smith-Heisters
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?

Thanks,
Ian
_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: gcinvoice: non-numeric invoice id

Robert Heller
At Wed, 28 May 2008 22:32:46 -0700 "Ian Smith-Heisters" <[hidden email]> 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
> [hidden email]
> 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
[hidden email]       -- Contract Programming: C/C++, Tcl/Tk
               
_______________________________________________
gnucash-user mailing list
[hidden email]
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                      -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller@deepsoft.com        -- http://www.deepsoft.com/ModelRailroadSystem/