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

ValueError for capital letters and special characters #7

Closed
tp27 opened this issue Jul 11, 2019 · 1 comment
Closed

ValueError for capital letters and special characters #7

tp27 opened this issue Jul 11, 2019 · 1 comment

Comments

@tp27
Copy link

tp27 commented Jul 11, 2019

Not able to encrypt a string with capital letters or Special characters in the string.
Please find the log when I was trying to encrypt a String "Testtesttest12" with a capital letter.

Traceback (most recent call last):
File "leap_data_encryption.py", line 41, in
df['enc_DEVICE_TYPE']=df['DEVICE_TYPE'].apply(encrypt)
File "/opt/usr/local/lib/python3.6/site-packages/pandas/core/series.py", line 3591, in apply
mapped = lib.map_infer(values, f, convert=convert_dtype)
File "pandas/_libs/lib.pyx", line 2217, in pandas._libs.lib.map_infer
File "leap_data_encryption.py", line 30, in encrypt
print(eS.encrypt('Testtesttest12'))
File "/opt/usr/local/lib/python3.6/site-packages/pyffx/codecs.py", line 15, in encrypt
return self.unpack(self.ffx.encrypt(self.radix, self.pack(v)), type(v))
File "/opt/usr/local/lib/python3.6/site-packages/pyffx/codecs.py", line 42, in pack
raise ValueError('non-alphabet character: %s' % e)
ValueError: non-alphabet character: 'T'

@emulbreh
Copy link
Owner

Hi @tp27, thanks for the report! Can you show how you initialize the Codec?

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