-
-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description of the bug
While executing "dl_docs" an AssertionError appears in the step "Exporting transactions" "
To Reproduce
Steps to reproduce the behavior:
- Ran the command `pytr dl_docs /home/folder1
Expected behavior
No error. The data is exported in the mentioned folder1
Error log
Exporting transactions ...
Traceback (most recent call last):
File "/home/stefan/.local/bin/pytr", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/stefan/.local/share/pipx/venvs/pytr/lib/python3.12/site-packages/pytr/main.py", line 354, in main
asyncio.get_event_loop().run_until_complete(dl.dl_loop())
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/stefan/.local/share/pipx/venvs/pytr/lib/python3.12/site-packages/pytr/dl.py", line 88, in dl_loop
self.tl.process_timelineDetail(response, self)
File "/home/stefan/.local/share/pipx/venvs/pytr/lib/python3.12/site-packages/pytr/timeline.py", line 206, in process_timelineDetail
self.check_if_done(dl)
File "/home/stefan/.local/share/pipx/venvs/pytr/lib/python3.12/site-packages/pytr/timeline.py", line 210, in check_if_done
self.finish_timeline_details(dl)
File "/home/stefan/.local/share/pipx/venvs/pytr/lib/python3.12/site-packages/pytr/timeline.py", line 237, in finish_timeline_details
).export(
^^^^^^^
File "/home/stefan/.local/share/pipx/venvs/pytr/lib/python3.12/site-packages/pytr/transactions.py", line 172, in export
writer.writerows(transactions)
File "/usr/lib/python3.12/csv.py", line 167, in writerows
return self.writer.writerows(map(self._dict_to_list, rowdicts))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stefan/.local/share/pipx/venvs/pytr/lib/python3.12/site-packages/pytr/transactions.py", line 164, in <genexpr>
transactions = (txn for event in events for txn in self.from_event(event))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/stefan/.local/share/pipx/venvs/pytr/lib/python3.12/site-packages/pytr/transactions.py", line 122, in from_event
assert event.value is not None, event
^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Event(date=datetime.datetime(2024, 2, 9, 15, 45, 28), title='Long 32,5572 $', event_type=<ConditionalEventType.TRADE_INVOICE: 2>, fees=1.0, isin='DE000HG4NGP4', note=None, shares=100.0, taxes=None, value=None)
Environment
- OS: Ubuntu 24.04.2 on virtualbox
- pytr version: 0.4.2
Thanks for any help!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working