'str' object has no attribute '_sa_instance_state' · Issue ...
github.com › Ghini › ghiniOct 05, 2017 · I can write a few lines that transform the string to a valid Species value: if isinstance ( value, str ): try : g, s = value. split ( ' ' ) [: 2 ] value = self. session. query ( Species ). filter ( Species. epithet==s ). join ( Genus ). filter ( Genus. epithet==g ). first () except : return. but this (very incomplete) code belongs to the class ...