[reportlab-users] graph error

Tim Roberts timr at probo.com
Tue Apr 12 13:24:18 EDT 2005


On Tue, 12 Apr 2005 09:44:40 +1000, Timothy Smith 
<timothy at open-networks.net> wrote:

>sorry but i'm totally stumped. i'm only giving .drawToFile 2 args and 
>it's bitching about 3. i must be missing something.
>is it actually drawToFile() thats the problem or should i look else where?
>  
>

It's in your code.

> File "/usr/home/timothy/Projects/PubWare/python/YearlyGraphPDF.py", 
>line 112, in MakeReport
>    renderPDF.drawToFile(ChartDrawing, 'tmp.pdf')
>...  File "/usr/local/lib/python2.3/site-packages/pyPgSQL/PgSQL.py", line 
>1598, in __rmul__
>    return self.__mul__(self, other)
>TypeError: __mul__() takes exactly 2 arguments (3 given)
>  
>

I'll wager that your data is coming from a Postgres query, and in at 
least one case you are passing the query result object instead of 
extracting the numeric data from that object.  If you post the code that 
does the query and adds it to the graph, we should be able to spot it.  
I've done a lot of pyPgSQL stuff.

-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the reportlab-users mailing list