TeamPGM / PagerMaid-Pyro

Advanced Multi-Featured Telegram UserBot by pyrogram.
GNU Affero General Public License v3.0
646 stars 81 forks source link

[Bug]: 安装出错 (unacceptable character) #9

Closed AnotiaWang closed 2 years ago

AnotiaWang commented 2 years ago

请确保您已阅读以上注意事项,并勾选下方的确认框。

PagerMaid 版本 (或 Commit Id)

1.0.7

运行环境

Linux

运行架构

AMD64

重现步骤

  1. 将 Telegram 昵称设置成包含特殊字符(如 𝘼
  2. 执行安装

期望的结果是什么?

能跑(指程序)

实际的结果是什么?

安装失败

简单的复现代码/链接(可选)

No response

日志记录(可选)

Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib64/python3.6/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib64/python3.6/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/var/lib/pagermaid/pagermaid/__init__.py", line 7, in <module>
    from pagermaid.config import Config
  File "/var/lib/pagermaid/pagermaid/config.py", line 25, in <module>
    config = load(open(r"config.yml"), Loader=FullLoader)
  File "/usr/local/lib64/python3.6/site-packages/yaml/__init__.py", line 79, in load
    loader = Loader(stream)
  File "/usr/local/lib64/python3.6/site-packages/yaml/loader.py", line 24, in __init__
    Reader.__init__(self, stream)
  File "/usr/local/lib64/python3.6/site-packages/yaml/reader.py", line 85, in __init__
    self.determine_encoding()
  File "/usr/local/lib64/python3.6/site-packages/yaml/reader.py", line 135, in determine_encoding
    self.update(1)
  File "/usr/local/lib64/python3.6/site-packages/yaml/reader.py", line 169, in update
    self.check_printable(data)
  File "/usr/local/lib64/python3.6/site-packages/yaml/reader.py", line 144, in check_printable
    'unicode', "special characters are not allowed")
yaml.reader.ReaderError: unacceptable character #x001b: special characters are not allowed
  in "config.yml", position 649

补充说明(可选)

omg-xtao commented 2 years ago

报错原因为配置文件 config.yml 第 649 个字符为特殊字符,请检查配置文件。

AnotiaWang commented 2 years ago

谢谢