elebumm / RedditVideoMakerBot

Create Reddit Videos with just✨ one command ✨
GNU General Public License v3.0
6.61k stars 1.84k forks source link

UnicodeEncodeError when running the code #8

Closed TonnaChan closed 2 years ago

TonnaChan commented 2 years ago

I am receiving the following error when running the code. What could be the issue?

UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f60a' in position 1: character maps to

elebumm commented 2 years ago

Are you able to provide the entire stack trace?

TonnaChan commented 2 years ago

Are you able to provide the entire stack trace?

[Running] python -u "c:\Users\alfre\Desktop\Tiktok auto video\RedditVideoMakerBot\main.py"

Traceback (most recent call last): File "c:\Users\alfre\Desktop\Tiktok auto video\RedditVideoMakerBot\main.py", line 10, in Thanks for using this tool! "### Thanks for using this tool! \U0001f60a Feel free to contribute to this project on GitHub!. If you have any questions, feel free to reach out to me on Twitter or submit a GitHub issue." File "c:\Users\alfre\Desktop\Tiktok auto video\RedditVideoMakerBot\utils\console.py", line 14, in print_markdown console.print(md) File "C:\Users\alfre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\rich\console.py", line 1683, in print self._buffer.extend(new_segments) File "C:\Users\alfre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\rich\console.py", line 838, in exit self._exit_buffer() File "C:\Users\alfre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\rich\console.py", line 796, in _exit_buffer self._check_buffer() File "C:\Users\alfre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\rich\console.py", line 1989, in _check_buffer self._buffer[:], LegacyWindowsTerm(self.file) File "C:\Users\alfre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\rich_windows_renderer.py", line 17, in legacy_windows_render term.write_styled(text, style) File "C:\Users\alfre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\rich_win32_console.py", line 418, in write_styled self.write_text(text) File "C:\Users\alfre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\rich_win32_console.py", line 379, in write_text self.write(text) File "C:\Users\alfre\AppData\Local\Programs\Python\Python37-32\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 '\U0001f60a' in position 1: character maps to

[Done] exited with code=1 in 6.916 seconds

elebumm commented 2 years ago

What machine are you on? Looks like it can't encode the emoji

TonnaChan commented 2 years ago

@elebumm I am using VS Code on my Windows 10 Desktop. Is there anything I can do to VS code or on my machine that will allow me to encode the emoji? Or maybe some tweak to the code that I can do to make it work

elebumm commented 2 years ago

@TonnaChan Try removing the emoji all together to see if that is the cause of the issue

callumio commented 2 years ago

Closed by #157