ricecooker icon indicating copy to clipboard operation
ricecooker copied to clipboard

Unicode problems

Open AtKristijan opened this issue 3 years ago • 1 comments

  • ricecooker version: 0.7.0b3
  • Python version: 3.9
  • Operating System: Windows

Description

Running chef script for creating the channel. The problem here is with loggers and open files that used files. There is unicode that are not recognized. This happened when I use Arabic language, but we can get this error on some other languages too. Here is one error: UnicodeEncodeError: 'charmap' codec can't encode characters in position 52-60: character maps to

What I Did

We can fix this error if we use encode='utf-8'

Where these errors occur

https://github.com/learningequality/ricecooker/blob/develop/ricecooker/managers/tree.py https://github.com/learningequality/ricecooker/blob/develop/ricecooker/classes/nodes.py

Error Traceback copy

UnicodeEncodeError: 'charmap' codec can't encode characters in position 86-95: character maps to File "C:\projects\learning_equallity\chefs_integrations\sushi-chef-kamkalima\venv\lib\site-packages\ricecooker\managers\tree.py", line 303, in add_nodes

AtKristijan avatar May 03 '22 20:05 AtKristijan

Note that I think this is specific to Windows, as the default encoding in the Windows terminal can often be something other than Unicode.

On most Linux systems, and I think on Mac, the default terminal encoding is more often than not Unicode, so this may explain why this has appeared only on Windows.

rtibbles avatar May 04 '22 15:05 rtibbles