Closed vlad-ed-git closed 1 year ago
@vlad-ed-git There's no description here.
@clstaudt Also when sending invoices: I still get the following error: AssertionError: assert invoice_path.exists()
ERROR | invoicing.intent:send_invoice_by_mail:197 - ❌ Error sending invoice by mail:
2023-01-19 19:12:18.330 | ERROR | invoicing.intent:send_invoice_by_mail:198 -
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 973, in _bootstrap
self._bootstrap_inner()
│ └ <function Thread._bootstrap_inner at 0x100670700>
└ <Thread(Thread-58 (<lambda>), started daemon 6220804096)>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
│ └ <function Thread.run at 0x100670430>
└ <Thread(Thread-58 (<lambda>), started daemon 6220804096)>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
│ │ │ │ │ └ {}
│ │ │ │ └ <Thread(Thread-58 (<lambda>), started daemon 6220804096)>
│ │ │ └ (<flet.control_event.ControlEvent object at 0x1232793c0>,)
│ │ └ <Thread(Thread-58 (<lambda>), started daemon 6220804096)>
│ └ <function InvoiceTile.build.<locals>.<lambda> at 0x123079900>
└ <Thread(Thread-58 (<lambda>), started daemon 6220804096)>
File "/Users/vlad/Desktop/vlad/tuttle/app/invoicing/view.py", line 439, in <lambda>
on_click=lambda e: self.on_mail_invoice(self.invoice),
│ │ │ │ └ Invoice(id=1, contract_id=1, sent=False, paid=False, rendered=False, number='1', date=datetime.date(2023, 1, 19), project_id=...
│ │ │ └ <invoicing.view.InvoiceTile object at 0x122fe3ee0>
│ │ └ <bound method InvoicingListView.on_mail_invoice of <invoicing.view.InvoicingListView object at 0x12305e4a0>>
│ └ <invoicing.view.InvoiceTile object at 0x122fe3ee0>
└ <flet.control_event.ControlEvent object at 0x1232793c0>
File "/Users/vlad/Desktop/vlad/tuttle/app/invoicing/view.py", line 187, in on_mail_invoice
result = self.intent.send_invoice_by_mail(invoice)
│ │ │ └ Invoice(id=1, contract_id=1, sent=False, paid=False, rendered=False, number='1', date=datetime.date(2023, 1, 19), project_id=...
│ │ └ <function InvoicingIntent.send_invoice_by_mail at 0x121aceb00>
│ └ <invoicing.intent.InvoicingIntent object at 0x12305e4d0>
└ <invoicing.view.InvoicingListView object at 0x12305e4a0>
> File "/Users/vlad/Desktop/vlad/tuttle/app/invoicing/intent.py", line 190, in send_invoice_by_mail
assert invoice_path.exists()
│ └ <function Path.exists at 0x100555480>
└ PosixPath('/Users/vlad/.tuttle/Invoices/1-pereira.pdf')
AssertionError: assert invoice_path.exists()
@vlad-ed-git
Better error handling added.
I suppose your fake invoices have not been successfully rendered. Check ~/.tuttle/Invoices for .pdf files.
If there are none check the log after installing the demo data and report the rendering error. Could be an issue with your Python env.
Also try creating a new invoice and check for the .pdf file.
okay, let me check for rendering
clean installing dependencies fixed this issue.
@clstaudt I do not get the same error as before #150 , now it says the invoice has not been rendered.