Skip to content

Commit

Permalink
fix bug when using the field <language> in metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
LoannPeurey committed Feb 12, 2025
1 parent 990b44b commit b149745
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ChildProject/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,15 +570,15 @@ def overview(args):

am = AnnotationManager(project)
project.read()

record = project.dict_summary()
except Exception as e:
logger.error(f"{source}: [%s] %s", type(e).__name__, e)
continue

if len(args.source) > 1:
logger.info(f"\033[1m\033[35m### {project.recordings['experiment'].iloc[0]} ({source}) ###\033[0m")

record = project.dict_summary()

available = project.recordings['recording_filename'].apply(lambda recording_filename: 1
if project.get_recording_path(recording_filename).exists() else 0).sum()

Expand Down
2 changes: 1 addition & 1 deletion ChildProject/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def dict_summary(self):
ages = self.compute_ages()
languages = (set(self.children['languages'].apply(
lambda x: [name.split(' ')[0] for name in x.split(';')]).explode()) if 'languages' in self.children.columns else set() +
set(self.children['language'].apply(lambda x: name.split(' ')[0])) if 'language' in self.children.columns else set())
set(self.children['language'].apply(lambda x: x.split(' ')[0])) if 'language' in self.children.columns else set())

record = {
'recordings': {
Expand Down

0 comments on commit b149745

Please sign in to comment.