-
-
Notifications
You must be signed in to change notification settings - Fork 25
Unable to encode and decode fiscal codes when year of birth (excluding century) < 10 (eg. 2004) #79
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
Comments
@deltaredentertainment Could you tell me the input arguments you are using for both, encoding and decoding? |
certamente, here is a copy of the code used for trial: ` cod = codicefiscale.encode( cod1 = codicefiscale.decode( print(cod1) Thanks! |
I have forgot to mention that it gives the error for both encode and decode |
Thank you! I will try to replicate the error. |
i tried even with others, but it keeps resulting in the same error. Let me know, thanks. |
Dear Fabio, |
@deltaredentertainment Looking at the cause of the problem I don't understand how the previous version can work well for you. Anyway... this is fixed now, you can upgrade to |
thanks, it works. |
Python version
3.9
Current behavior (bug description)
When calling both the .encode and .decode function with any birthplace it raises a ValueError:
Traceback (most recent call last):
File "/Users/davideramondetti/..../handler.py", line 19, in
cod1 = codicefiscale.decode(
File "/Users/davideramondetti/.../venv/lib/python3.9/site-packages/codicefiscale/codicefiscale.py", line 485, in decode
raise ValueError(f"[codicefiscale] wrong birthplace code: {birthplace_code!r}")
ValueError: [codicefiscale] wrong birthplace code: 'L219'
Expected behavior
It is expected for the .decode to return the extracted data, and for the Encode to output the fiscal code.
The text was updated successfully, but these errors were encountered: