You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a Scidata object is modified after calling the SciData.output class property, a KeyError can be raised. This is due to output deleting either self.['@graph']['scidata']['methodology'], self.['@graph']['scidata']['system'], or self.['@graph']['scidata']['dataset'] if ['aspects'], ['facets'], or ['dataseries'] are empty.
I think this can be fixed by adding try/except blocks to each of the self.aspects(), self.facets(), and self.dataseries() class methods to catch these exceptions, but I'm unsure if that fix will break anything else.
The text was updated successfully, but these errors were encountered:
Thanks for issue report. I think you are correct that adding try/except will fix this issue, but should not affect anything else. I will take a look...but I'm not sure how quickly I can get too it...
OK, sorry this took so long but I have just committed an update to code that should fix this. I took a (hopefully) simpler approach and copied the content to another variable in the output function, so it works on that data instead of self.meta. See commit 1ff8547. Also, other updates to the code pushed today, so any feedback in general appreciated.
If a
Scidata
object is modified after calling theSciData.output
class property, aKeyError
can be raised. This is due tooutput
deleting eitherself.['@graph']['scidata']['methodology']
,self.['@graph']['scidata']['system']
, orself.['@graph']['scidata']['dataset']
if['aspects']
,['facets']
, or['dataseries']
are empty.I think this can be fixed by adding try/except blocks to each of the
self.aspects()
,self.facets()
, andself.dataseries()
class methods to catch these exceptions, but I'm unsure if that fix will break anything else.The text was updated successfully, but these errors were encountered: