AMI-system / species_classifier

This repository contains the code to create on-device machine learning models for species classification.
MIT License
2 stars 0 forks source link

Catch gbif download asci errors #18

Closed KatrionaGoldmann closed 1 year ago

KatrionaGoldmann commented 1 year ago

Some species returning error during download: UnicodeEncodeError: 'ascii' codec can't encode character '\xf6' in position 42: ordinal not in range(128)

Example: Lepidoptera,Noctuidae,Amphipoea,Amphipoea oculea,Amphipoea oculea

KatrionaGoldmann commented 1 year ago

Issue was arising with the URL: https://image.laji.fi/MM.166203/Amphipoea_oculea_kaunosekoyökkönen_tv20170817_007.jpg which contains ö

This would create Amphipoea/Noctuidae/Amphipoea oculea/3448068839.jpg

Solved using quote() around the non-ascii characters in #21