CiCiApp / PyInvoice

Invoice/Receipt Generator
MIT License
44 stars 30 forks source link

TypeError: __init__() got an unexpected keyword argument 'colWidths #5

Open maxwellIragu opened 3 years ago

maxwellIragu commented 3 years ago

I keep getting this error

File "/usr/local/lib/python3.9/dist-packages/pyinvoice/templates.py", line 314, in finish self.build(self._story, **kwargs) File "/usr/local/lib/python3.9/dist-packages/reportlab/platypus/doctemplate.py", line 1315, in build BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker) File "/usr/local/lib/python3.9/dist-packages/reportlab/platypus/doctemplate.py", line 1080, in build self.handle_flowable(flowables) File "/usr/local/lib/python3.9/dist-packages/reportlab/platypus/doctemplate.py", line 937, in handle_flowable S = frame.split(f,canv) File "/usr/local/lib/python3.9/dist-packages/reportlab/platypus/frames.py", line 251, in split r = flowable.split(self._aW, h) File "/usr/local/lib/python3.9/dist-packages/reportlab/platypus/tables.py", line 1546, in split return self._splitRows(availHeight) File "/usr/local/lib/python3.9/dist-packages/reportlab/platypus/tables.py", line 1390, in _splitRows R0 = self.__class__( data[:n], colWidths=self._colWidths, rowHeights=splitH[:n], TypeError: __init__() got an unexpected keyword argument 'colWidths'

Dont know where the issue is?

maxwellIragu commented 3 years ago

I think I may have found a work around so on you files there is such a file: /usr/local/lib/python3.9/dist-packages/reportlab/platypus/doctemplate.py On line 935 I added: self.allowSplitting = 0 This however means the details are added on page 2 of the invoice. I think the issue was with the splitting

farrem68 commented 3 years ago

I'm having this issue also , your fix worked but i am wondering how did you make it through multi pages of data?

as in when you reach your page limit in the transaction table , how to you page break to add more details in that table ?