nih-cfde / dashboard-api

Other
0 stars 0 forks source link

Exception thrown in catalog 9 for assay - sample count - species bar graph. #11

Closed jonathancrabtree closed 3 years ago

jonathancrabtree commented 3 years ago

Looks like a possible issue with cfde-deriva assuming that species is always present/supported. Could catch the AttributeError and handle this gracefully:

counts = list(StatsQuery(helper).entity(vm['entity']).dimension(gm1['dimension'],show_nulls=show_nulls).dimension(gm2['dimension'],show_nulls=show_nulls).fetch())
  File "/Users/jcrabtree/CFDE/api/app/cfde-deriva-git/cfde_deriva/dashboard_queries.py", line 266, in dimension
    add_path_func(self, show_nulls=show_nulls, **kwargs)
  File "/Users/jcrabtree/CFDE/api/app/cfde-deriva-git/cfde_deriva/dashboard_queries.py", line 74, in _add_species_leaf
    on=( queryobj.path.level1_stats.species_id == species.id ),
  File "/Users/jcrabtree/CFDE/venv/lib/python3.8/site-packages/deriva/core/datapath.py", line 666, in __getattr__
    return getattr(super(_TableWrapper, self), a)
AttributeError: 'super' object has no attribute 'species_id'
karlcz commented 3 years ago

I think this is just an inconstency in the dev environment with a catalog built using a prior dev version of the level1 stats table, so it doesn't have the expected table definition... we'll resolve it by deleting/replacing that and similary stale catalogs w/ newly prepared submissions

jonathancrabtree commented 3 years ago

Unable to reproduce. Closing.