rasa - RASA X: UnicodeEncodeError: 'charmap' codec can't encode character when run Rasa X
问题描述
I am using Rasa Open Source to build a chatbot application and it works pretty well. I want to use Rasa X to make more use of its features. But I get this problem every time I run the command rasa x
:
Traceback (most recent call last):
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\services\story_service.py", line 212, in get_story_steps
return StoryService._reader_read_from_string(reader, story_string)
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\services\story_service.py", line 130, in _reader_read_from_string
f.write(story_string)
File "c:\users\admin\anaconda3\envs\chatbot3\lib\tempfile.py", line 481, in func_wrapper
return func(*args, **kwargs)
File "c:\users\admin\anaconda3\envs\chatbot3\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 '\u1ee7' in position 25: character maps to <undefined>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasa\cli\x.py", line 500, in run_locally
domain_path=domain_path,
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\local.py", line 242, in main
project_path, data_path, session, args.port, config_path, domain_path
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\local.py", line 169, in _initialize_with_local_data
domain_path=domain_path,
File "c:\users\admin\anaconda3\envs\chatbot3\lib\asyncio\base_events.py", line 579, in run_until_complete
return future.result()
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\initialise.py", line 375, in inject_files_from_disk
username,
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\initialise.py", line 135, in inject_stories
story_files, team, project_id, username
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\services\story_service.py", line 553, in save_stories_from_files
is_test=is_test,
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\services\story_service.py", line 434, in save_stories
story_string, filename, domain, is_test
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\services\story_service.py", line 332, in _extract_stories_markdown
test_stories=is_test,
File "c:\users\admin\anaconda3\envs\chatbot3\lib\site-packages\rasax\community\services\story_service.py", line 216, in get_story_steps
"'{}'\nError: {}".format(story_string, e)
rasa.shared.core.training_data.story_reader.story_reader.StoryParseError
I tried using rasa x and it seems to be perfect for English. But my current language is Vietnamese. Does rasa x have a problem with it?
Someone please help me!
UPDATE
I fixed the charmap bug and start the bot successfully, but something went wrong making the conversation not so smooth.
WARNING:rasax.community.services.event_consumers.event_consumer:Saving event failed due to an 'IntegrityError'.
An error occured when trying to send the telemetry event: HTTPSConnectionPool(host='api.segment.io', port=443): Max retries exceeded with url: /v1/track (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 500 Internal Server Error')))
解决方案
这个警告:
An error occured when trying to send the telemetry event: HTTPSConnectionPool(host='api.segment.io', port=443): Max retries exceeded with url: /v1/track (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 500 Internal Server Error')))
不是应该影响机器人的问题;它只是说它试图发送遥测事件但不能。遥测事件不是你的机器人/Rasa X 需要操作的东西。除非它导致机器人出现实际问题,否则您可以忽略它。
推荐阅读
- python - 如何使用 Twitch api python 检查是否有人在 twitch 上直播
- recursion - 在 Prolog 中结束递归
- android - 从 Material Design TextInputEditText 的布局 XML 调用 onTextChanged 处理程序
- python - 运行 FastAPI 的 docker img 时出现 ModuleNotFoundError
- statistics - 来自 TTestIndPower(Python) 与 Gpower/R 的比例测试的功率/样本大小估计
- java - base64 编码的签名属性 DER 结构中的消息摘要
- python - 具有生成中间带有通配符的回文字符串的功能。需要帮助来改进它
- c++ - 为什么 C 语言不是面向对象的语言,即使它具有与 C++ 的 Class 关键字相同的(结构)struct 关键字?
- amazon-web-services - AWS Cloudwatch 仪表板自定义时间范围
- mongodb - Mongodb Atlas Charts - 在不同的列中显示分组计数