Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing two A2L files with overlapping characteristics #53

Open
PHochmann opened this issue Jul 18, 2024 · 0 comments
Open

Error parsing two A2L files with overlapping characteristics #53

PHochmann opened this issue Jul 18, 2024 · 0 comments

Comments

@PHochmann
Copy link

PHochmann commented Jul 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant