chingkingm / hoshinobot-plugin-petpet Goto Github PK
View Code? Open in Web Editor NEWThis project forked from noneplugin/nonebot-plugin-petpet
HoshinoBot module for making fun pictures
License: MIT License
This project forked from noneplugin/nonebot-plugin-petpet
HoshinoBot module for making fun pictures
License: MIT License
pip install emoji --upgrade
[2022-07-14 17:23:27,064 头像表情包] ERROR: <class 'nonebot.message.CanceledException'> occured when gen_image handling message -69795279.
[2022-07-14 17:23:27,064 头像表情包] ERROR: ServiceFunc of HoshinoBot finished.
Traceback (most recent call last):
File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/__init__.py", line 126, in gen_image
im = await make_image(com, sender, users, args=args)
File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/data_source.py", line 93, in make_image
return await command.func(users, sender=sender, args=args)
File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/functions.py", line 96, in universal
return await make_jpg_or_gif(img, make)
File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/utils.py", line 334, in make_jpg_or_gif
return save_jpg(await func(img))
File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/functions.py", line 87, in make
await text_frame(a, min_fontsize)
File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/functions.py", line 81, in text_frame
await draw_text(
File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/utils.py", line 62, in draw_text
if all([char not in UNICODE_EMOJI["en"] for char in text]):
File "/root/bot/XCW/Hoshino/hoshino/modules/petpet/utils.py", line 62, in <listcomp>
if all([char not in UNICODE_EMOJI["en"] for char in text]):
KeyError: 'en'
目前我自己的处理方式是把贴贴/亲亲/摸摸等删了,不知道有没有别的方法,还有一个"玩游戏"会触发"玩"和"玩游戏"不知道咋解决。。。
之前的一些插件可以引入
from hoshino.util import DailyNumberLimiter
来限制每日发送的次数
那么这个插件如何才能限制群员每日发送的次数呢?
[2022-12-05 16:45:03,306 nonebot] ERROR: Failed to import "hoshino.modules.Hoshinobot-plugin-petpet.utils", error: Bindings generation error. Submodule name should always start with a parent module name. Parent name: cv2.cv2. Submodule name: cv2
[2022-12-05 16:45:03,306 nonebot] ERROR: Bindings generation error. Submodule name should always start with a parent module name. Parent name: cv2.cv2. Submodule name: cv2
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin.py", line 249, in load_plugin
module = importlib.import_module(module_path)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in call_with_frames_removed
File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\Hoshinobot-plugin-petpet_init.py", line 11, in
from .data_source import commands, make_image
File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\Hoshinobot-plugin-petpet\data_source.py", line 5, in
from .utils import to_image
File "C:\Users\Administrator\Desktop\HoshinoBot\HoshinoBot\hoshino\modules\Hoshinobot-plugin-petpet\utils.py", line 4, in
from cv2 import cv2 as cv
ImportError: Bindings generation error. Submodule name should always start with a parent module name. Parent name: cv2.cv2. Submodule name: cv2
是按照正常的安装方法安装的,前面Issues的方法也试过了,但是还是报错了,遇到了这个问题。
[2022-05-17 19:02:59,764 nonebot] ERROR: Failed to import "hoshino.modules.petpet.data_source", error: No module named 'typing_extensions'
[2022-05-17 19:02:59,765 nonebot] ERROR: No module named 'typing_extensions'
Traceback (most recent call last):
File "C:\Users\servers\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin.py", line 253, in load_plugin
module = importlib.import_module(module_path)
File "C:\Users\servers\AppData\Local\Programs\Python\Python38\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in load_unlocked
File "", line 848, in exec_module
File "", line 219, in call_with_frames_removed
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet_init.py", line 10, in
from .data_source import commands, make_image
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet\data_source.py", line 5, in
from .utils import to_image
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet\utils.py", line 10, in
from typing_extensions import Literal
ModuleNotFoundError: No module named 'typing_extensions'
[2022-05-17 19:02:59,770 nonebot] INFO: Succeeded to import "hoshino.modules.petpet.download"
[2022-05-17 19:02:59,775 nonebot] ERROR: Failed to import "hoshino.modules.petpet.functions", error: No module named 'typing_extensions'
[2022-05-17 19:02:59,777 nonebot] ERROR: No module named 'typing_extensions'
Traceback (most recent call last):
File "C:\Users\servers\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin.py", line 253, in load_plugin
module = importlib.import_module(module_path)
File "C:\Users\servers\AppData\Local\Programs\Python\Python38\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in load_unlocked
File "", line 848, in exec_module
File "", line 219, in call_with_frames_removed
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet_init.py", line 10, in
from .data_source import commands, make_image
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet\data_source.py", line 5, in
from .utils import to_image
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet\utils.py", line 10, in
from typing_extensions import Literal
ModuleNotFoundError: No module named 'typing_extensions'
[2022-05-17 19:02:59,785 nonebot] ERROR: Failed to import "hoshino.modules.petpet.models", error: No module named 'typing_extensions'
[2022-05-17 19:02:59,785 nonebot] ERROR: No module named 'typing_extensions'
Traceback (most recent call last):
File "C:\Users\servers\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin.py", line 253, in load_plugin
module = importlib.import_module(module_path)
File "C:\Users\servers\AppData\Local\Programs\Python\Python38\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in load_unlocked
File "", line 848, in exec_module
File "", line 219, in call_with_frames_removed
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet_init.py", line 10, in
from .data_source import commands, make_image
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet\data_source.py", line 5, in
from .utils import to_image
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet\utils.py", line 10, in
from typing_extensions import Literal
ModuleNotFoundError: No module named 'typing_extensions'
[2022-05-17 19:02:59,796 nonebot] ERROR: Failed to import "hoshino.modules.petpet.utils", error: No module named 'typing_extensions'
[2022-05-17 19:02:59,797 nonebot] ERROR: No module named 'typing_extensions'
Traceback (most recent call last):
File "C:\Users\servers\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin.py", line 253, in load_plugin
module = importlib.import_module(module_path)
File "C:\Users\servers\AppData\Local\Programs\Python\Python38\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in call_with_frames_removed
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet_init.py", line 10, in
from .data_source import commands, make_image
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet\data_source.py", line 5, in
from .utils import to_image
File "D:\hoshinoBOT\HoshinoBot\hoshino\modules\petpet\utils.py", line 10, in
from typing_extensions import Literal
ModuleNotFoundError: No module named 'typing_extensions'
最新版opencv-python-headless报错ImportError: cannot import name ‘_registerMatType‘ from ‘cv2.cv2
需要限制一下版本opencv-python-headless<4.3
(仅在centos7测试)
我依赖全装了,发指令无回复。而且lssv里一直都不显示,求作者大大帮忙
请问 原版更新了 这个是停更了嘛
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.