transifex / transifex-client

The Transifex command-line tool.
https://www.transifex.com/
GNU General Public License v2.0
135 stars 75 forks source link

Encoding error when pulling Armenian (hy) translation #255

Closed Mikhael-Danilov closed 5 years ago

Mikhael-Danilov commented 5 years ago
tx --version
0.13.5, py 3.6, x86_64

tx pull --traceback

tx WARNING:  -> hy: translations/remixed-dungeon.stringsxml/hy.xml
tx ERROR: Error received from server: Error compiling the translation file: 'ascii' codec can't encode characters in position 33-40: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/txclib/cmdline.py", line 70, in main
    utils.exec_command(cmd, rest, path_to_tx)
  File "/usr/local/lib/python3.6/dist-packages/txclib/utils.py", line 394, in exec_command
    cmd_fn(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/txclib/commands.py", line 459, in cmd_pull
    parallel=parallel, no_interactive=options.no_interactive,
  File "/usr/local/lib/python3.6/dist-packages/txclib/project.py", line 554, in pull
    callback_args={"local_file": local_file}
  File "/usr/local/lib/python3.6/dist-packages/txclib/project.py", line 986, in do_url_request
    skip_decode=skip_decode, callback=cb, callback_args=args
  File "/usr/local/lib/python3.6/dist-packages/txclib/utils.py", line 239, in make_request
    **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/txclib/utils.py", line 278, in perform_single_request
    r_value = parse_tx_response(response, skip_decode)
  File "/usr/local/lib/python3.6/dist-packages/txclib/utils.py", line 324, in parse_tx_response
    raise Exception("Error received from server: {}".format(data))
Exception: Error received from server: Error compiling the translation file: 'ascii' codec can't encode characters in position 33-40: ordinal not in range(128)
Mikhael-Danilov commented 5 years ago

With help of Transifex support I figured out: issue was caused by "<" ">" characters in translated string.