Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding problem with reading files downloaded from brenda #7

Closed
MistyField opened this issue Jul 27, 2023 · 2 comments
Closed

Encoding problem with reading files downloaded from brenda #7

MistyField opened this issue Jul 27, 2023 · 2 comments

Comments

@MistyField
Copy link
Contributor

MistyField commented Jul 27, 2023

The .txt file downloaded from http:/www.brenda-enzymes.org is encoded in utf-8. But in the line 76 of parser.py it's:
with open(path_to_database, encoding="iso-8859-1") as file:
maybe it should be changed into:
with open(path_to_database, encoding="utf-8") as file:?
because if the file was decoded in iso-8859-1, the meta of the reaction may become
'#4# pH 7.0, 30°C, recombinantwild-type enzyme <6>; #4# pH 7.0, 30°C, recombinant free enzyme <8>'
but if it was changed into utf-8, it turns normal: '#4# pH 7.0, 30°C, recombinantwild-type enzyme <6>; #4# pH 7.0, 30°C, recombinant free enzyme <8>'

@Robaina
Copy link
Owner

Robaina commented Sep 10, 2023

Hi @MistyField ,

thanks for noticing this and apologies for the late reply. I don't remember now why I used that particular encoding but you are right there. I'm planning to update BRENDApyrser to accommodate the "new" json format BRENDA released a while ago, see issue #9. It doesn't make much sense to continue parsing the txt file having now a json.

Best!

@Robaina
Copy link
Owner

Robaina commented Sep 15, 2023

Issue solved in PR #8

@Robaina Robaina closed this as completed Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants