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

Encoding problem #126

Open
alinusss opened this issue Jul 4, 2023 · 2 comments
Open

Encoding problem #126

alinusss opened this issue Jul 4, 2023 · 2 comments

Comments

@alinusss
Copy link
Collaborator

alinusss commented Jul 4, 2023

While running zwaad with pineforest algorithm, if I put in the answer line the letter in russian encoding, then remove it with Backspace, then put the correct english letter, got error and process interruption.

the command is

zwaad --answers snad4_ans_AV.txt --anomalies snad4_anom_AV.txt --oid sid_snad4_r_100.dat --feature feature_snad4_r_100.dat --feature-names feature_snad4_r_100.name --budget 40 --random_seed 42 pineforest

then I got
Is 601210400015694 anomaly? [y/N]:
type russian letter, erase it, change encoding by "alt+shift" and got

Traceback (most recent call last): File "/home/alina/venv/bin/zwaad", line 33, in sys.exit(load_entry_point('zwad', 'console_scripts', 'zwaad')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/alina/zwad/zwad/aad.py", line 284, in execute_from_commandline main(argv) File "/home/alina/zwad/zwad/aad.py", line 280, in main for (oid, decision) in engine.run(oids, features, answers): File "/home/alina/zwad/zwad/aad.py", line 121, in _run_interactive result, label = self._evaluate(a_oid) ^^^^^^^^^^^^^^^^^^^^^ File "/home/alina/zwad/zwad/aad.py", line 107, in _evaluate result = click.confirm("Is {} anomaly?".format(name)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/alina/venv/lib/python3.11/site-packages/click/termui.py", line 235, in confirm value = visible_prompt_func(" ").lower().strip() ^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd1 in position 0: invalid continuation byte

@alinusss
Copy link
Collaborator Author

alinusss commented Jul 4, 2023

the same thing appears, when I change the encoding through clicking on the language sign in the tray

@alinusss
Copy link
Collaborator Author

alinusss commented Jul 4, 2023

if I type a russian letter, then erase it with Backspace and also erase the space, which is after : and type english letter, I don't get any error and continue normally

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

1 participant