Skip to content

Reading a second journal from Python causes an assertion failure #2320

Open
@andrew521

Description

@andrew521

The issue has been raised multiple times:

#1953
#514
#974
#973
#972

exemple:

journal = ledger.read_journal(j_file) # first time works fine
journal = ledger.read_journal(j_file)
*** RuntimeError: Assertion failed in "/home/*****/ledger-3.3.2/src/session.cc", line 183:std::size_t ledger::session_t::read_data(const string&): xact_count == journal->xacts.size()

In the old tickets, closing the jurnal was recommended a couple of times, but it actually crashes python:

ledger.close_journal_files() # Segmentation fault

Wondering if anyone can provide a fix? TIA.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existspythonRelated to the Python API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions