Skip to content

[Bug]: nicodeEncodeError: 'gbk' codec can't encode character '\u2713' in position 0: illegal multibyte sequence #1780

@hanxudong1122

Description

@hanxudong1122

crawl4ai version

0.8

Expected Behavior

[Running] python -u "d:\spider\tempCodeRunnerFile.python"
D:\python\python311\Lib\site-packages\requests_init_.py:113: RequestsDependencyWarning: urllib3 (2.6.3) or chardet (6.0.0.post1)/charset_normalizer (3.4.4) doesn't match a supported version!
warnings.warn(
[INIT].... �� Crawl4AI 0.8.0
[FETCH]... �� https://crawl4ai.com
| [FETCH]... �� https://crawl4ai.com
| Traceback (most recent call last):
File "D:\python\python311\Lib\site-packages\crawl4ai\async_webcrawler.py", line 411, in arun
self.logger.url_status(
File "D:\python\python311\Lib\site-packages\crawl4ai\async_logger.py", line 288, in url_status
self._log(
File "D:\python\python311\Lib\site-packages\crawl4ai\async_logger.py", line 227, in _log
self.console.print(log_line)
File "D:\python\python311\Lib\site-packages\rich\console.py", line 1697, in print
with self:
File "D:\python\python311\Lib\site-packages\rich\console.py", line 870, in exit
self._exit_buffer()
File "D:\python\python311\Lib\site-packages\rich\console.py", line 826, in _exit_buffer
self._check_buffer()
File "D:\python\python311\Lib\site-packages\rich\console.py", line 2042, in _check_buffer
self._write_buffer()
File "D:\python\python311\Lib\site-packages\rich\console.py", line 2078, in _write_buffer
legacy_windows_render(buffer, LegacyWindowsTerm(self.file))
File "D:\python\python311\Lib\site-packages\rich_windows_renderer.py", line 17, in legacy_windows_render
term.write_styled(text, style)
File "D:\python\python311\Lib\site-packages\rich_win32_console.py", line 441, in write_styled
self.write_text(text)
File "D:\python\python311\Lib\site-packages\rich_win32_console.py", line 402, in write_text
self.write(text)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2713' in position 0: illegal multibyte sequence

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "d:\spider\tempCodeRunnerFile.python", line 14, in
asyncio.run(main())
File "D:\python\python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "D:\python\python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "d:\spider\tempCodeRunnerFile.python", line 8, in main
result = await crawler.arun(url="https://crawl4ai.com")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python311\Lib\site-packages\crawl4ai\deep_crawling\base_strategy.py", line 42, in wrapped_arun
return await original_arun(url, config=config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\python\python311\Lib\site-packages\crawl4ai\async_webcrawler.py", line 495, in arun
self.logger.error_status(
File "D:\python\python311\Lib\site-packages\crawl4ai\async_logger.py", line 317, in error_status
self._log(
File "D:\python\python311\Lib\site-packages\crawl4ai\async_logger.py", line 227, in _log
self.console.print(log_line)
File "D:\python\python311\Lib\site-packages\rich\console.py", line 1697, in print
with self:
File "D:\python\python311\Lib\site-packages\rich\console.py", line 870, in exit
self._exit_buffer()
File "D:\python\python311\Lib\site-packages\rich\console.py", line 826, in _exit_buffer
self._check_buffer()
File "D:\python\python311\Lib\site-packages\rich\console.py", line 2042, in _check_buffer
self._write_buffer()
File "D:\python\python311\Lib\site-packages\rich\console.py", line 2078, in _write_buffer
legacy_windows_render(buffer, LegacyWindowsTerm(self.file))
File "D:\python\python311\Lib\site-packages\rich_windows_renderer.py", line 17, in legacy_windows_render
term.write_styled(text, style)
File "D:\python\python311\Lib\site-packages\rich_win32_console.py", line 441, in write_styled
self.write_text(text)
File "D:\python\python311\Lib\site-packages\rich_win32_console.py", line 402, in write_text
self.write(text)
UnicodeEncodeError: 'gbk' codec can't encode character '\u2713' in position 0: illegal multibyte sequence

Current Behavior

a

Is this reproducible?

Yes

Inputs Causing the Bug

Steps to Reproduce

Code snippets

OS

windows

Python version

3.11

Browser

No response

Browser version

No response

Error logs & Screenshots (if applicable)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⁇ Needs ClarificationThe issue requires additional details or a rewrite to be actionable.🐞 BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions