Closed deltaredentertainment closed 1 year ago
@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:
` from codicefiscale import codicefiscale
cod = codicefiscale.encode( lastname="Rossi", firstname="Mario", gender="M", birthdate="29/11/2004", birthplace="Torino", )
cod1 = codicefiscale.decode( "RSSMRA00S29L219C" )
print(cod1)
print(cod)
and here is the error:
site-packages/codicefiscale/codicefiscale.py", line 408, in encode
decode(code)
line 485, in decode
raise ValueError(f"[codicefiscale] wrong birthplace code: {birthplace_code!r}")
ValueError: [codicefiscale] wrong birthplace code: 'L219'`
Thanks!
I have forgot to mention that it gives the error for both encode and decode
Thank you! That birthplace code is correct and I'm also sure that it has been used in the test suite.
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, I have downloaded the previous version (0.6.1) and now is working properly. Regards, DR
@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 0.7.1
version.
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.