RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

nothing...

Open jtsmith510 opened this issue 4 years ago • 4 comments

$ python main.py

Thanks for using this tool!Traceback (most recent call last): File "C:\Users\justi\RedditVideoMakerBot\main.py", line 9, in print_markdown( File "C:\Users\justi\RedditVideoMakerBot\utils\console.py", line 14, in print_markdown console.print(md) File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich\console.py", line 1635, in print with self: File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich\console.py", line 838, in exit self._exit_buffer() File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich\console.py", line 796, in _exit_buffer self._check_buffer() File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich\console.py", line 1988, in _check_buffer legacy_windows_render( File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich_windows_renderer.py", line 17, in legacy_windows_render term.write_styled(text, style) File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich_win32_console.py", line 418, in write_styled self.write_text(text) File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich_win32_console.py", line 379, in write_text self.write(text) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.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 '\U0001f60a' in position 1: character maps to

jtsmith510 avatar Jun 01 '22 03:06 jtsmith510

I'm on my phone right now so I cant actually help you but as far as I can tell to fix this just comment out the print_md function call in the beginning of main.py

JasonLovesDoggo avatar Jun 01 '22 03:06 JasonLovesDoggo

Now this happens::

$ python3 main.py +-----------------------------------------------------------------------------+ | Getting AskReddit threads... | +-----------------------------------------------------------------------------+ Video will be: What slang word did you hear that let you know you are no longer Traceback (most recent call last): File "C:\Users\justi\Desktop\RedditVideoMakerBot\main.py", line 16, in reddit_object = get_askreddit_threads() File "C:\Users\justi\Desktop\RedditVideoMakerBot\reddit\askreddit.py", line 27, in get_askreddit_threads print_substep(f"Video will be: {submission.title} :thumbsup:") File "C:\Users\justi\Desktop\RedditVideoMakerBot\utils\console.py", line 26, in print_substep console.print(text, style=style) File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich\console.py", line 1635, in print with self: File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich\console.py", line 838, in exit self._exit_buffer() File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich\console.py", line 796, in _exit_buffer self._check_buffer() File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich\console.py", line 1988, in _check_buffer legacy_windows_render( File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich_windows_renderer.py", line 19, in legacy_windows_render term.write_text(text) File "C:\Users\justi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\rich_win32_console.py", line 379, in write_text self.write(text) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.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 '\U0001f44d' in position 7: character maps to

jtsmith510 avatar Jun 01 '22 04:06 jtsmith510

UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f44d' in position 7: character maps to

@IStayThatWayCoding it looks like whatever title you're receiving includes some special characters that fail to encode, \U0001f44d is an emoji (👍), however when i try on my end, those work fine for me, i think this is an issue in your OS, what OS are you using?

try removing :thumbsup: on askreddit.py line 27, also 😎 from background.py line 23, see if that helps.

SpaYco avatar Jun 01 '22 10:06 SpaYco

On windows 11, just deleted all emojis in the .py files, everything works great!

jtsmith510 avatar Jun 01 '22 11:06 jtsmith510