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

reno might fail generating release notes file when using some encoding #7315

Open
silvanocerza opened this issue Mar 6, 2024 · 3 comments
Open
Labels
P3 Low priority, leave it in the backlog topic:DX Developer Experience

Comments

@silvanocerza
Copy link
Contributor

silvanocerza commented Mar 6, 2024

Original message below.

@Lord-Haji would you please add reno release note, see Contributing guide for instructions. Also adding a few unit test will significantly speed up integration of this PR 🙏

Hi @vblagoje I tried generating release notes but kept encountering weird issues while attempting to run it. I'll retry it later but it seemed to me there was some sort of UTF-8 decode error. I am on Windows

Idk if this is dumb but I'm attaching the traceback too if in case someone can help out. here since I can't really figure out a shortcut fix to this

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "E:\haystack\venv\bin\reno.exe\__main__.py", line 7, in <module>
  File "E:\haystack\venv\lib\python3.11\site-packages\reno\main.py", line 225, in main
    conf = config.Config(args.reporoot, args.relnotesdir)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\haystack\venv\lib\python3.11\site-packages\reno\config.py", line 335, in __init__
    self._load_file()
  File "E:\haystack\venv\lib\python3.11\site-packages\reno\config.py", line 352, in _load_file
    self._contents = yaml.safe_load(fd)
                     ^^^^^^^^^^^^^^^^^^
  File "E:\haystack\venv\lib\python3.11\site-packages\yaml\__init__.py", line 125, in safe_load
    return load(stream, SafeLoader)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\haystack\venv\lib\python3.11\site-packages\yaml\__init__.py", line 79, in load
    loader = Loader(stream)
             ^^^^^^^^^^^^^^
  File "E:\haystack\venv\lib\python3.11\site-packages\yaml\loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "E:\haystack\venv\lib\python3.11\site-packages\yaml\reader.py", line 85, in __init__
    self.determine_encoding()
  File "E:\haystack\venv\lib\python3.11\site-packages\yaml\reader.py", line 124, in determine_encoding
    self.update_raw()
  File "E:\haystack\venv\lib\python3.11\site-packages\yaml\reader.py", line 178, in update_raw
    data = self.stream.read(size)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\msys64\mingw64\lib\python3.11\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 1826: character maps to <undefined>

Originally posted by @Lord-Haji in #7303 (comment)

@silvanocerza silvanocerza added the topic:DX Developer Experience label Mar 6, 2024
@Lord-Haji
Copy link
Contributor

the emojis in the releasenotes/config.yaml are the one causing issues.
Current workaround for Windows users is it enable UTF-8 system wide via intl.cpl
Link to Stackoverflow thread.

I believe this should be added to CONTRIBUTING.md

@vblagoje
Copy link
Member

vblagoje commented Mar 7, 2024

Nice investigative work @Lord-Haji !!

@masci
Copy link
Contributor

masci commented Mar 7, 2024

I would just remove the emojis to be honest

@anakin87 anakin87 added the P3 Low priority, leave it in the backlog label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low priority, leave it in the backlog topic:DX Developer Experience
Projects
None yet
Development

No branches or pull requests

5 participants