inveniosoftware / datacite

Python API wrapper for the DataCite API.
https://datacite.readthedocs.io
Other
27 stars 33 forks source link

rest: cast to string client attributes #64

Closed ppanero closed 3 years ago

ppanero commented 3 years ago

The issue arises when the prefix is casted to a floated point by python... e.g.

image

Which happens in check_doi function:

if '/' in doi:
            split = doi.split('/')
            prefix = split[0]
            if prefix != self.prefix:
                # Provided a DOI with the wrong prefix
>               raise ValueError('Wrong DOI {0} prefix provided, it should be '
                                 '{1} as defined in the rest client'
                                 .format(prefix, self.prefix))
E               ValueError: Wrong DOI 10.1234 prefix provided, it should be 10.1234 as defined in the rest client

Will need a release... minor?