sfyc23 / EverydayWechat

微信助手:1.每日定时给好友(女友)发送定制消息。2.机器人自动回复好友。3.群助手功能(例如:查询垃圾分类、天气、日历、电影实时票房、快递物流、PM2.5等)
MIT License
9.99k stars 2.31k forks source link

想请问下,出现了一个bug,你看看咋回事 #68

Closed Nono17 closed 5 years ago

Nono17 commented 5 years ago
"expected <block end>, but found %r" % token.id, token.start_mark)

yaml.parser.ParserError: while parsing a block mapping in "_config.yaml", line 6, column 1 expected , but found '' in "_config.yaml", line 25, column 2

NuoLanC commented 5 years ago

不是提示出那行出错么?配置贴一下?

Nono17 commented 5 years ago

不是提示出那行出错么?配置贴一下?

Traceback (most recent call last): File "D:/program/EverydayWechat/run.py", line 21, in run() File "D:/program/EverydayWechat/run.py", line 9, in run GFWeather().run() File "D:\program\EverydayWechat\GFWeather.py", line 21, in init self.girlfriend_list, self.alarm_hour, self.alarm_minute, self.dictum_channel = self.get_init_data() File "D:\program\EverydayWechat\GFWeather.py", line 29, in get_init_data config = yaml.load(f, Loader=yaml.Loader) File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\yaml__init__.py", line 114, in load return loader.get_single_data() File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\yaml\constructor.py", line 41, in get_single_data node = self.get_single_node() File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\yaml\composer.py", line 36, in get_single_node document = self.compose_document() File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\yaml\composer.py", line 55, in compose_document node = self.compose_node(None, None) File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\yaml\composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\yaml\composer.py", line 127, in compose_mapping_node while not self.check_event(MappingEndEvent): File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\yaml\parser.py", line 98, in check_event self.current_event = self.state() File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\yaml\parser.py", line 439, in parse_block_mapping_key "expected , but found %r" % token.id, token.start_mark) yaml.parser.ParserError: while parsing a block mapping in "_config.yaml", line 6, column 1 expected , but found '' in "_config.yaml", line 25, column 2

详细信息是这个,但是不太明白yaml文件哪出错了

sfyc23 commented 5 years ago

应该是你的 yaml 配置文件出错了。你看一下 yaml 的语法。