pcroland / deew

Dolby Encoding Engine Wrapper
https://deew.dev
MIT License
195 stars 20 forks source link

[BUG] deew crashes if rich cannot render styling to the terminal #43

Closed ghost closed 1 year ago

ghost commented 1 year ago

Description of the the bug Program fails to execute due to rich not being able to render to the terminal

Traceback (most recent call last):
  File "__main__.py", line 6, in <module>
  File "deew\__main__.py", line 551, in main
  File "rich\__init__.py", line 73, in print
  File "rich\console.py", line 1646, in print
  File "rich\console.py", line 848, in __exit__
  File "rich\console.py", line 806, in _exit_buffer
  File "rich\console.py", line 1999, in _check_buffer
  File "rich\_windows_renderer.py", line 17, in legacy_windows_render
  File "rich\_win32_console.py", line 442, in write_styled
  File "rich\_win32_console.py", line 403, in write_text
  File "encodings\cp1252.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode characters in position 1-5: character maps to <undefined>
[15076] Failed to execute script '__main__' due to unhandled exception!

Version deew 2.9.3

OS System Agnostic but tested on Windows 11

pcroland commented 1 year ago

@george-avn What terminal are you using?

ghost commented 1 year ago

@george-avn What terminal are you using?

Its a embeded terminal window of bash that has limited functionallity, this also happens when you invoke deew within staxrip

You can recreate it using staxrip and it will turn the same error as my terminal session

pcroland commented 1 year ago

I think you should open an issue on rich's GitHub page.

ghost commented 1 year ago

I dont think rich supports these terminals at all, thats why I'm suggesting a completly silent option for deew

pcroland commented 1 year ago

Failing like that shouldn't be the case in any terminal. Try to open an issue for rich or staxrip.