Skip to content

Encoding problem #126

@alinusss

Description

@alinusss

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions