Skip to content

Unable to use toncli in directories containing Unicode characters in names #80

@ProgramCrafter

Description

@ProgramCrafter

Bug Type

Functional

Reproduction steps

  1. Put some wallet contract directory inside directory with Unicode (for example, Russian) characters in name
  2. Try to use toncli run_tests

Actual result

INFO: Start tests
unknown-location: error: Wrong encoding

Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python39\Scripts\toncli.exe\__main__.py", line 7, in <module>
  File "C:\Program Files\Python39\lib\site-packages\toncli\main.py", line 65, in main
    CommandsExecuter(command, string_kwargs, parser)
  File "C:\Program Files\Python39\lib\site-packages\toncli\modules\utils\commands\commands_executer.py", line 39, in __init__
    self.command_mapper[command](self)
  File "C:\Program Files\Python39\lib\site-packages\toncli\modules\utils\commands\commands_executer.py", line 49, in run_tests_command
    return RunTestsCommand(self.string_kwargs, self.parser)
  File "C:\Program Files\Python39\lib\site-packages\toncli\modules\utils\commands\command_classes\run_tests_command.py", line 12, in __init__
    test_runner.run(args.contracts.split() if args.contracts else None,
  File "C:\Program Files\Python39\lib\site-packages\toncli\modules\utils\test\tests.py", line 44, in run
    build_test(getcwd(), contracts=real_contracts, cwd=getcwd(), compile_tests_with_contract=not run_tests_old_way)
  File "C:\Program Files\Python39\lib\site-packages\toncli\modules\utils\test\commands.py", line 56, in build_test
    build_test_files([*func_and_test_files, *contract.func_files_locations, *contract.func_tests_files_locations],
  File "C:\Program Files\Python39\lib\site-packages\toncli\modules\utils\test\commands.py", line 87, in build_test_files
    get_output = check_output(build_command,
  File "C:\Program Files\Python39\lib\subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Program Files\Python39\lib\subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['...\\ton-win64-binaries\\func.exe', '-o', '...тест_русский\\wallet\\build\\contract_tests.fif', '-SPA', '...\\toncli\\func-libs\\error_codes.func', '...\\toncli\\func-libs\\math.func', '...\\toncli\\func-libs\\stdlib.func', '...\\toncli\\test-libs\\1.address_helpers.func', '...\\toncli\\test-libs\\bad_messages_generator.func', '...\\toncli\\test-libs\\c5_parse_helpers.func', '...\\toncli\\test-libs\\message_helpers.func', '...\\toncli\\test-libs\\storage-test-helpers.func', '...\\toncli\\test-libs\\tests-helpers.func', '...\\toncli\\test-libs\\token-helpers.func', '...тест_русский\\wallet\\func\\Untitled-1.fc', '...тест_русский\\wallet\\tests\\tests.fc']' returned non-zero exit status 2.

Expected result

Compilation successful

Suggested Severity

Medium

Device

Desktop:

  • OS: Windows 10
  • toncli -v: INFO: v0.0.43
  • Hash of ton-win64-binaries without libcrypto (7-Zip, SHA256):
    • 2B90BB7F64269494EFC17069C9115399E3AF6A8BF77456FE137FA752DDD31806 - data hash
    • 4432D55FDBFE2B67CE051745779FB9BE050C986A33C007934533A989371BAA11 - data and names hash

Additional Context

No response

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