mgsky1 / fg Goto Github PK
View Code? Open in Web Editor NEW基于Nonebot的QQ群机器人🤖️,特色功能是利用机器学习算法,基于每日聊天记录生成每日总结。可在酷Q/Mirai平台上运行
License: Apache License 2.0
基于Nonebot的QQ群机器人🤖️,特色功能是利用机器学习算法,基于每日聊天记录生成每日总结。可在酷Q/Mirai平台上运行
License: Apache License 2.0
处理消息函数handleGroupMsg(session)在整个项目里面没有调用过,chatA.txt和chaB.txt都是空的,删除后不能自动重新创建
我把群消息和计时器都写了两份 但是只有原始的那份群号的群会有播报 新写的没有
首先很抱歉再一次打扰了大佬,之前FG运行一直报错Run time of job "handle Timer (trigger: cron [ hour ='23', minute ='0'], next run at: 2020-09-07 23:00:00 CST)" was missed by 0:00:02.962467
,我自己看了一下,应该是nonebot计划任务功能APScheduler的问题,于是去查阅了apscheduler的文档,找到了一个解决方法Missed job executions and coalescing,此方法为增加执行程序中的线程/进程数或者将misfire_grace_time
设置调整为更高的值,但是我翻遍了FG的所有配置文件,都没有找到可以修改misfire_grace_time
的配置文件,所以想麻烦大佬指路一下,或者,在FG里面是否有其他的解决方法?
您好,请问安装需求库时报错该怎么破(用的清华镜像源)
ERROR: Command errored out with exit status 1: 'c:\users\administrator\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Administrator\AppData\Local\Temp\pip-install-31gcfy8w\wordcloud_93c47f8d610b4076afa38262a64e3b71\setup.py'"'"'; file='"'"'C:\Users\Administrator\AppData\Local\Temp\pip-install-31gcfy8w\wordcloud_93c47f8d610b4076afa38262a64e3b71\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Administrator\AppData\Local\Temp\pip-record-dv83qfg4\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\administrator\appdata\local\programs\python\python38\Include\wordcloud' Check the logs for full command output.
Prefix dict has been built successfully.
Traceback (most recent call last):
File "E:\bot\FG\cn\acmsmu\FG\DailyConclusion.py", line 94, in __generateWC
wc.to_file(os.path.join(os.getcwd(),'cn','acmsmu','FG','data','assets','wc',figName))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\wordcloud\wordcloud.py", line 706, in to_file
img.save(filename, optimize=True)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\PIL\Image.py", line 2131, in save
fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: 'E:\bot\FG\cn\acmsmu\FG\data\assets\wc\2021-01-1923-10-08-58.png'
Executing <Task pending name='Task-19' coro=<run_coroutine_job() running at C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\apscheduler\executors\base_py3.py:29> cb=[AsyncIOExecutor._do_submit_job..callback() at C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\apscheduler\executors\asyncio.py:39] created at C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\apscheduler\executors\asyncio.py:51> took 8.171 seconds
可以看出结巴分词还有算法中的连成文章部分成功了 但是WC生成失败了
不支持监听自己的事件吗,
close
我按照前面的环境要求安装完了依赖(python版本3.8,wordcloud版本1.8.0),但到了最后一步执行python bot.py的时候,出现了报错,提示找不到使用json的ujson模块,以下为报错内容:
ujson module not found, using json
Traceback (most recent call last):
File "bot.py", line 10, in <module>
import config
File "C:\software\Mirai\plugins\FG-mirai\config.py", line 11, in <module>
configuration = JsonUtils.json2Dict(os.path.join(os.getcwd(),'cn','acmsmu','FG','data','config.json'))
File "C:\software\Mirai\plugins\FG-mirai\Utils\JsonUtils.py", line 15, in json2Dict
jsonDict = json.loads(f.read())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 29 column 42 (char 629)
我代码水平不行,不过还是想挣扎一下,了解一下是哪里出了错误,有没有解决的办法,麻烦大佬有时间的话可以解答一下,非常感谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.