Skip to content

Error parsing two A2L files with overlapping characteristics #53

@PHochmann

Description

@PHochmann

When I parse two A2L in separate instances, e.g.

db = DB()
session = db.import_a2l(
    a2l_path, in_memory=False, remove_existing=True
)

Whenever I parsed another A2L before, the overlapping characteristics (i.e. same name, but different address) get the address from the first A2L, not the second. Is there some global state in the background? a2l_path is different, I tried in_memory=False and True and remove_existing=False and True.

EDIT: I've debugged the problem and it seems the problem is that CachedBase does not consider the session when handling the cache but only the name of objects. It should be a combination of session and name that defines a unique cache entry. My workaround was to empty the cache each time I'm parsing a new A2L.

Thanks,
Philipp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions