Skip to content

UnicodeEncodeError: 'charmap' codec can't encode character '\u23f0' in position 328: character maps to <undefined>_ #41

@devkeydet

Description

@devkeydet

I have a very simple test here:
https://github.com/devkeydet/actions-includes-test/blob/main/.github/workflows-src/convertme.yml

I installed actions-includes using pip. I run the following command:

python -m actions_includes ./.github/workflows-src/convertme.yml ./.github/workflows/converted.yml

I get the following error:
_Expanding ./.github/workflows-src/convertme.yml into ./.github/workflows/converted.yml
Expanding workflow file from: C:\github\actions-includes-test.github\workflows-src\convertme.yml
to: .github\workflows\converted.yml
Loading yaml file C:\github\actions-includes-test.github\workflows-src\convertme.yml with contents md5 of 7ce0775b6ab05a87deb53ae9d298df80
get_action_data: C:\github\actions-includes-test.github\workflows-src\convertme.yml ./actions/basic C:\github\actions-includes-test\actions\basic
Including: C:\github\actions-includes-test\actions\basic/action.yml
Loading yaml file C:\github\actions-includes-test\actions\basic/action.yml with contents md5 of bb475f262af8e4df34241a188a4f451f
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Marc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\actions_includes_main
.py", line 25, in
sys.exit(main())
File "C:\Users\Marc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\actions_includes_init
.py", line 1035, in main
f.write(out_data)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u23f0' in position 328: character maps to

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions