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

Error with apostrophes #7

Open
fermo111 opened this issue Sep 23, 2015 · 1 comment
Open

Error with apostrophes #7

fermo111 opened this issue Sep 23, 2015 · 1 comment

Comments

@fermo111
Copy link

There is an error when the last name is 3 characters long and contains an apostrophe. E.g.: FO'

@valholl
Copy link

valholl commented Oct 22, 2015

This is the error:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/codicefiscale.py", line 161, in build
    output = __surname_triplet(surname) + __name_triplet(name)
  File "/usr/lib/python2.7/dist-packages/codicefiscale.py", line 94, in __surnam
e_triplet
    return __common_triplet(input_string, consonants, vowels)
  File "/usr/lib/python2.7/dist-packages/codicefiscale.py", line 71, in __common
_triplet
    output += vowels.pop(0)
IndexError: pop from empty list

And also happens when the surname is just one character long.

(I will look into it more in detail in the next few days, and possibly propose a patch.)

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