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

Ambiguous table name on increment_access during fetch_nwb #942

Open
CBroz1 opened this issue Apr 23, 2024 · 0 comments
Open

Ambiguous table name on increment_access during fetch_nwb #942

CBroz1 opened this issue Apr 23, 2024 · 0 comments

Comments

@CBroz1
Copy link
Member

CBroz1 commented Apr 23, 2024

The function to determine the fetch_nwb calling table from the stack

def get_fetching_table_from_stack(stack):
"""Get all classes from a stack of tables."""
classes = set()
for frame_info in stack:
locals_dict = frame_info.frame.f_locals
for obj in locals_dict.values():
if not isinstance(obj, UserTable):
continue # skip non-tables
if (name := obj.full_table_name) in PERIPHERAL_TABLES:
continue # skip common_nwbfile tables
classes.add(name)
if len(classes) > 1:
logger.warn(
f"Multiple classes found in stack: {classes}. "
"Please submit a bug report with the snippet used."
)
classes = None # predict only one but not sure, so return None
return next(iter(classes)) if classes else None

finds multiple entries when using either of the following

LFPArtifactDetection().populate(key)
LFPBandV1().populate(key)

This is not an issue for these cases, because the entry already exists in the log table. We may experience problems if other processes fail to find the calling table and the file is not already in the log table

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