Fix python3 specific issue in create_cobra_model_from_sbml_file.
Fix python3 specific issue in create_cobra_model_from_sbml_file.

The unspecific catch in

    try:
        rule = reaction_note_dict['GENE ASSOCIATION'][0].encode('ascii')
        if rule.startswith("&quot;") and rule.endswith("&quot;"):
            rule = rule[6:-6]
        reaction.gene_reaction_rule = str(rule)
    except:
        warn("gene_reaction_rule is not ascii compliant")

hid the problem that `str.encode` returns byte in python3 letting

    TypeError: startswith first arg must be bytes or a tuple of bytes, not str

go silent.

I reorganized the code a little and made the exception catch `UnicodeEncodeError` specifically to avoid further problems.

jerkos/cobrapy,jerkos/cobrapy,zakandrewking/cobrapy,JuBra/cobrapy,jeicher/cobrapy,zakandrewking/cobrapy,JuBra/cobrapy,aebrahim/cobrapy,jeicher/cobrapy,aebrahim/cobrapy