Comments (8)
我是用的官网下的py3.10 然后用poetry虚拟环境运行的 你可以试试
from nonebot-plugin-htmlrender.
使用本项目中的 example
运行在 Win11 x64 中
使用Python版本和Pip
PS D:\git\nonebot-plugin-htmlrender\example> pip --version
pip 22.1.1 from C:\Users\27822\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)
PS D:\git\nonebot-plugin-htmlrender\example> python --version
Python 3.10.4
使用的包
Package Version
------------------------- -----------
aiofiles 0.8.0
anyio 3.6.1
arrow 1.2.2
asgiref 3.5.2
binaryornot 0.4.4
certifi 2022.5.18.1
chardet 4.0.0
charset-normalizer 2.0.12
click 8.1.3
colorama 0.4.4
cookiecutter 1.7.3
fastapi 0.78.0
greenlet 1.1.2
h11 0.12.0
httpcore 0.15.0
httptools 0.4.0
httpx 0.23.0
idna 3.3
Jinja2 3.1.2
jinja2-time 0.2.0
loguru 0.6.0
Markdown 3.3.7
MarkupSafe 2.1.1
multidict 6.0.2
nb-cli 0.6.7
nonebot-adapter-onebot 2.0.0b1
nonebot-plugin-htmlrender 0.0.5
nonebot2 2.0.0b3
Pillow 9.1.1
pip 22.1.1
playwright 1.22.0
poyo 0.5.0
prompt-toolkit 3.0.29
pydantic 1.9.1
pyee 8.1.0
pyfiglet 0.8.post1
Pygments 2.12.0
pygtrie 2.4.2
pymdown-extensions 9.4
python-dateutil 2.8.2
python-dotenv 0.20.0
python-markdown-math 0.8
python-slugify 6.1.2
PyYAML 6.0
requests 2.27.1
rfc3986 1.5.0
setuptools 58.1.0
six 1.16.0
sniffio 1.2.0
starlette 0.19.1
text-unidecode 1.3
tomlkit 0.10.2
typing_extensions 4.2.0
urllib3 1.26.9
uvicorn 0.17.6
watchgod 0.8.2
wcwidth 0.2.5
websockets 10.1
win32-setctime 1.1.0
yarl 1.7.2
直接运行
PS D:\git\nonebot-plugin-htmlrender\example> python .\bot.py
05-30 15:45:00 [SUCCESS] nonebot | NoneBot is initializing...
05-30 15:45:00 [INFO] nonebot | Current Env: dev
05-30 15:45:01 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_htmlrender"
05-30 15:45:01 [SUCCESS] nonebot | Succeeded to import "render"
05-30 15:45:01 [SUCCESS] nonebot | Running NoneBot...
05-30 15:45:01 [WARNING] uvicorn | Current configuration will not reload as not all conditions are met,please refer to documentation.
05-30 15:45:01 [INFO] uvicorn | Started server process [1380]
05-30 15:45:01 [INFO] uvicorn | Waiting for application startup.
05-30 15:45:02 [INFO] nonebot_plugin_htmlrender | Browser Started.
05-30 15:45:02 [INFO] uvicorn | Application startup complete.
05-30 15:45:02 [INFO] uvicorn | Uvicorn running on http://0.0.0.0:9905 (Press CTRL+C to quit)
05-30 15:45:06 [INFO] uvicorn | ('192.168.0.49', 49408) - "WebSocket /onebot/v11/ws" [accepted]
05-30 15:45:06 [INFO] nonebot | OneBot V11 | Bot xxxxxx connected
05-30 15:45:06 [INFO] websockets | connection open
05-30 15:45:08 [SUCCESS] nonebot | ONEBOT V11 3571509319 | [message.group.normal]: Message -278508567 from xxxx@[群:xxxx] "/md2pic test"
05-30 15:45:08 [INFO] nonebot | Event will be handled by <Matcher from plugins.render, type=message, priority=1, temp=False>
05-30 15:45:10 [SUCCESS] nonebot | ONEBOT V11 3571509319 | [message_sent]: {'time': 1653896709, 'self_id': xxxxx, 'post_type': 'message_sent', 'sub_type': 'normal', 'message_type': 'group', 'user_id': xxxxx, 'message': '[CQ:image,file=f75d3877e541065d23e95e9091b0a6c5.image,url=https://gchat.qpic.cn/gchatpic_new/xxxx/xxxx-xx-F75D3xxxxx0A6C5/0?term=255,subType=0]', 'group_id': xxxx, 'message_id': xxx, 'raw_message': '[CQ:image,file=f75d3877e541065d23e95e9091b0a6c5.image,subType=0]', 'message_seq': 1472, 'font': 0, 'anonymous': None, 'sender': {'age': 0, 'area': '', 'card': '', 'level': '', 'nickname': 'Mikko', 'role': 'member', 'sex': 'unknown', 'title': '', 'user_id': xxxxx}}
05-30 15:45:10 [INFO] nonebot | Matcher <Matcher from plugins.render, type=message, priority=1, temp=False> running complete
05-30 15:45:15 [INFO] uvicorn | Shutting down
05-30 15:45:15 [WARNING] nonebot | OneBot V11 | WebSocket for Bot xxxx closed by peer
05-30 15:45:15 [INFO] websockets | connection closed
05-30 15:45:15 [INFO] uvicorn | Waiting for application shutdown.
05-30 15:45:15 [INFO] nonebot_plugin_htmlrender | Browser Stopped.
05-30 15:45:15 [INFO] uvicorn | Application shutdown complete.
05-30 15:45:15 [INFO] uvicorn | Finished server process [1380]
测试结果
发送成功
from nonebot-plugin-htmlrender.
目前测试是在 async_playwright().start() 时出现错误
from nonebot-plugin-htmlrender.
在你配置文件里 .env.dev
或 .env.pord
里面找到 FASTAPI_RELOAD=true
把他改成 FASTAPI_RELOAD=false
from nonebot-plugin-htmlrender.
非常感谢, 目前配置FASTAPI_RELOAD=false后, 问题已解决
from nonebot-plugin-htmlrender.
我在win10上使用pycharm的debug
模式运行时会报这个错误,但是普通的运行就不会,改了.env.dev
也没用,我的用的机器人是nonebot
衍生的真寻bot
,大佬有什么头绪吗
from nonebot-plugin-htmlrender.
去找真寻提issue 他应该用不到我的插件吧
而且这个好像是win的问题
from nonebot-plugin-htmlrender.
真寻没用这个插件,是我自己开发用的
from nonebot-plugin-htmlrender.
Related Issues (20)
- 导入ERROR,是否缺少什么? HOT 1
- 是否有方法可以提升图片的清晰度 HOT 1
- 纯编程小白,想问下安装该插件后启动期间报这个错 HOT 7
- 话说有没有可选字体或者字号的选项啊 HOT 2
- 使用htmlrender会导致nb的--reload参数在重启时卡死 HOT 4
- 使用插件计算原神队伍伤害报错 HOT 1
- 安装依赖chrome后,报错 HOT 5
- 无法启动playwright,会默认重新下载失败报错 HOT 3
- version `GLIBC_2.28' not found HOT 3
- 安装后bot启动闪退,没但报错信息 HOT 1
- markdown 表格转图片样式 HOT 3
- htmlrender_proxy_host到底需要怎么配置 HOT 1
- 请教一下html2img如何使用本地图片资源 HOT 5
- [Feature] 允许配置 playwright 的channel参数 HOT 1
- 如何让playwright实例常驻后台 HOT 1
- 在退出Nonebot实例时浏览器提前退出导致退出函数阻塞,Nonebot无法关闭的错误 HOT 1
- [Feature] 添加 screenshot 的参数 omitBackground animations HOT 3
- 安装插件后,启动报错 HOT 1
- 支持自动调整图片长度
- 启动之后报错,好像是安装了nonebot-plugin-bfchat这个插件之后出的问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nonebot-plugin-htmlrender.