Closed yoiyamisaya closed 2 years ago
pip install poetry
poetry install
poetry shell
playwright install-deps chromium
执行完毕后 python bot.py
启动
重新装了以后能运行了,但是现在事这样
C:\qwer>pythonbot.py
05-20 08:11:32 [SUCCESS] nonebot | NoneBot is initializing...
05-20 08:11:32 [INFO] nonebot | Current Env: dev
05-20 08:11:33 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_apscheduler"
05-20 08:11:36 [SUCCESS] nonebot | Succeeded to import "ban"
05-20 08:11:39 [SUCCESS] nonebot | Succeeded to import "help"
05-20 08:11:40 [SUCCESS] nonebot | Succeeded to import "update_info"
C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\apscheduler\util.py:95: PytzUsageWarning: The zone attribute is specific to pytz's interface; please migrate to a new time zone provider. For more details on how to do so, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
if obj.zone == 'local':
05-20 08:11:40 [SUCCESS] nonebot | Succeeded to import "apscheduler"
05-20 08:11:40 [SUCCESS] nonebot | Succeeded to import "init_plugin_config"
05-20 08:11:40 [SUCCESS] nonebot | Succeeded to import "group_handle"
05-20 08:11:40 [SUCCESS] nonebot | Succeeded to import "buy"
05-20 08:11:40 [SUCCESS] nonebot | Succeeded to import "reset_today_gold"
05-20 08:11:41 [SUCCESS] nonebot | Succeeded to import "use"
05-20 08:11:41 [SUCCESS] nonebot | Succeeded to import "gold"
05-20 08:11:41 [SUCCESS] nonebot | Succeeded to import "my_props"
05-20 08:11:41 [SUCCESS] nonebot | Succeeded to import "shop_handle"
05-20 08:11:41 [SUCCESS] nonebot | Succeeded to import "shop_handle"
05-20 08:11:41 [SUCCESS] nonebot | Succeeded to import "shop"
05-20 08:11:41 [SUCCESS] nonebot | Succeeded to import "chat_message_handle"
05-20 08:11:41 [SUCCESS] nonebot | Succeeded to import "chat_message"
05-20 08:11:41 [SUCCESS] nonebot | Succeeded to import "chat_history"
05-20 08:11:42 [SUCCESS] nonebot | Succeeded to import "scripts"
05-20 08:11:42 [SUCCESS] nonebot | Succeeded to import "admin_help"
05-20 08:11:42 [SUCCESS] nonebot | Succeeded to import "super_help"
05-20 08:11:43 [SUCCESS] nonebot | Succeeded to import "timing_task"
05-20 08:11:43 [SUCCESS] nonebot | Succeeded to import "switch_rule"
05-20 08:11:43 [SUCCESS] nonebot | Succeeded to import "rule"
05-20 08:11:43 [SUCCESS] nonebot | Succeeded to import "admin_config"
05-20 08:11:43 [SUCCESS] nonebot | Succeeded to import "custom_welcome_message"
05-20 08:11:43 [SUCCESS] nonebot | Succeeded to import "update_group_member_info"
05-20 08:11:43 [SUCCESS] nonebot | Succeeded to import "admin_bot_manage"
05-20 08:11:43 [SUCCESS] nonebot | Succeeded to import "invite_manager"
05-20 08:11:44 [SUCCESS] nonebot | Succeeded to import "nickname"
05-20 08:11:44 [SUCCESS] nonebot | Succeeded to import "broadcast"
05-20 08:11:44 [SUCCESS] nonebot | Succeeded to import "hooks"
05-20 08:11:44 [SUCCESS] nonebot | Succeeded to import "manager_group"
05-20 08:11:44 [SUCCESS] nonebot | Succeeded to import "clear_data"
05-20 08:11:44 [SUCCESS] nonebot | Succeeded to import "reload_setting"
05-20 08:11:44 [SUCCESS] nonebot | Succeeded to import "set_admin_permissions"
05-20 08:11:45 [SUCCESS] nonebot | Succeeded to import "update_friend_group_info"
05-20 08:11:45 [SUCCESS] nonebot | Succeeded to import "super_task_switch"
05-20 08:11:45 [SUCCESS] nonebot | Succeeded to import "bot_friend_group"
05-20 08:11:46 [SUCCESS] nonebot | Succeeded to import "exec_sql"
05-20 08:11:46 [SUCCESS] nonebot | Succeeded to import "super_cmd"
05-20 08:11:46 [SUCCESS] nonebot | Succeeded to import "pixiv_rank_search"
05-20 08:11:47 [SUCCESS] nonebot | Succeeded to import "parse_bilibili_json"
05-20 08:11:47 [SUCCESS] nonebot | Succeeded to import "sign_in"
05-20 08:11:47 [SUCCESS] nonebot | Succeeded to import "update_picture"
05-20 08:11:48 [SUCCESS] nonebot | Succeeded to import "weather"
05-20 08:11:49 [SUCCESS] nonebot | Succeeded to import "word_hanlde"
05-20 08:11:49 [SUCCESS] nonebot | Succeeded to import "message_handle"
05-20 08:11:49 [SUCCESS] nonebot | Succeeded to import "model"
05-20 08:11:49 [SUCCESS] nonebot | Succeeded to import "word_bank"
05-20 08:11:49 [SUCCESS] nonebot | Succeeded to import "gold_redbag"
05-20 08:11:49 [SUCCESS] nonebot | Succeeded to import "fake_msg"
05-20 08:11:49 [SUCCESS] nonebot | Succeeded to import "fudu"
05-20 08:11:49 [SUCCESS] nonebot | Succeeded to import "what_anime"
05-20 08:11:49 [ERROR] nonebot | Failed to import "bilibili_sub"
Traceback (most recent call last):
File "C:\qwer\bot.py", line 14, in <module>
nonebot.load_plugins("plugins")
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\nonebot\plugin\load.py", line 39, in load_plugins
return manager.load_all_plugins()
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\nonebot\plugin\manager.py", line 128, in load_all_plugins
return set(
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\nonebot\plugin\manager.py", line 129, in <genexpr>
filter(None, (self.load_plugin(name) for name in self.list_plugins()))
> File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\nonebot\plugin\manager.py", line 106, in load_plugin
module = importlib.import_module(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\nonebot\plugin\manager.py", line 194, in exec_module
super().exec_module(module)
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\qwer\plugins\bilibili_sub\__init__.py", line 4, in <module>
from .data_source import (
File "C:\qwer\plugins\bilibili_sub\data_source.py", line 2, in <module>
from bilireq.exceptions import ResponseCodeError
ModuleNotFoundError: No module named 'bilireq'
05-20 08:11:50 [SUCCESS] nonebot | Succeeded to import "about"
05-20 08:11:50 [SUCCESS] nonebot | Succeeded to import "search_buff_skin_price"
05-20 08:11:50 [SUCCESS] nonebot | Succeeded to import "check"
05-20 08:11:50 [SUCCESS] nonebot | Succeeded to import "poke"
05-20 08:11:50 [SUCCESS] nonebot | Succeeded to import "coser"
05-20 08:11:51 [SUCCESS] nonebot | Succeeded to import "open_cases"
05-20 08:11:51 [SUCCESS] nonebot | Succeeded to import "russian"
05-20 08:11:51 [SUCCESS] nonebot | Succeeded to import "statistics_handle"
05-20 08:11:51 [SUCCESS] nonebot | Succeeded to import "statistics_hook"
05-20 08:11:51 [SUCCESS] nonebot | Succeeded to import "statistics"
05-20 08:11:51 [SUCCESS] nonebot | Succeeded to import "nbnhhsh"
05-20 08:11:51 [SUCCESS] nonebot | Succeeded to import "ai"
05-20 08:11:52 [SUCCESS] nonebot | Succeeded to import "bt"
05-20 08:11:52 [SUCCESS] nonebot | Succeeded to import "aconfig"
05-20 08:11:52 [SUCCESS] nonebot | Succeeded to import "withdraw"
05-20 08:11:52 [SUCCESS] nonebot | Succeeded to import "quotations"
05-20 08:11:52 [SUCCESS] nonebot | Succeeded to import "translate"
05-20 08:11:53 [SUCCESS] nonebot | Succeeded to import "search_anime"
05-20 08:11:53 [SUCCESS] nonebot | Succeeded to import "draw_card"
05-20 08:11:54 [SUCCESS] nonebot | Succeeded to import "send_dinggong_voice"
05-20 08:11:54 [SUCCESS] nonebot | Succeeded to import "yiqing"
05-20 08:11:54 [SUCCESS] nonebot | Succeeded to import "one_friend"
05-20 08:11:54 [SUCCESS] nonebot | Succeeded to import "white2black_image"
05-20 08:11:54 [SUCCESS] nonebot | Succeeded to import "send_image"
05-20 08:11:54 [SUCCESS] nonebot | Succeeded to import "move_image"
05-20 08:11:54 [SUCCESS] nonebot | Succeeded to import "delete_image"
05-20 08:11:54 [SUCCESS] nonebot | Succeeded to import "upload_image"
05-20 08:11:55 [SUCCESS] nonebot | Succeeded to import "image_management"
05-20 08:11:55 [SUCCESS] nonebot | Succeeded to import "send_setu"
05-20 08:11:55 [SUCCESS] nonebot | Succeeded to import "update_setu"
05-20 08:11:55 [SUCCESS] nonebot | Succeeded to import "send_setu_"
05-20 08:11:55 [SUCCESS] nonebot | Succeeded to import "epic"
05-20 08:11:55 [SUCCESS] nonebot | Succeeded to import "mute"
05-20 08:11:55 [SUCCESS] nonebot | Succeeded to import "search_image"
05-20 08:11:56 [SUCCESS] nonebot | Succeeded to import "check_zhenxun_update"
05-20 08:11:56 [SUCCESS] nonebot | Succeeded to import "black_word"
05-20 08:11:56 [SUCCESS] nonebot | Succeeded to import "web_ui"
05-20 08:11:56 [SUCCESS] nonebot | Succeeded to import "luxun"
05-20 08:11:56 [SUCCESS] nonebot | Succeeded to import "pid_search"
05-20 08:11:56 [SUCCESS] nonebot | Succeeded to import "update_gocqhttp"
05-20 08:11:57 [SUCCESS] nonebot | Succeeded to import "roll"
05-20 08:11:57 [SUCCESS] nonebot | Succeeded to import "dialogue"
05-20 08:11:57 [SUCCESS] nonebot | Succeeded to import "music"
05-20 08:11:57 [SUCCESS] nonebot | Succeeded to import "my_info"
05-20 08:11:57 [SUCCESS] nonebot | Succeeded to import "almanac"
05-20 08:11:57 [SUCCESS] nonebot | Succeeded to import "query_resource_points"
05-20 08:11:58 [SUCCESS] nonebot | Succeeded to import "material_remind"
05-20 08:11:58 [SUCCESS] nonebot | Succeeded to import "reset_today_query_user_data"
05-20 08:11:58 [SUCCESS] nonebot | Succeeded to import "bind"
05-20 08:11:58 [SUCCESS] nonebot | Succeeded to import "query_memo"
05-20 08:11:58 [SUCCESS] nonebot | Succeeded to import "resin_remind"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "query_memo"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "genshin_sign"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "query_role"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "query_user"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "genshin"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "group_welcome_msg"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "comments_163"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "poetry"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "jitang"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "cover"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "wbtop"
05-20 08:11:59 [SUCCESS] nonebot | Succeeded to import "alapi"
05-20 08:12:00 [SUCCESS] nonebot | Succeeded to import "pix_add_keyword"
05-20 08:12:00 [SUCCESS] nonebot | Succeeded to import "pix_pass_del_keyword"
05-20 08:12:00 [SUCCESS] nonebot | Succeeded to import "pix_update"
05-20 08:12:00 [SUCCESS] nonebot | Succeeded to import "pix"
05-20 08:12:01 [SUCCESS] nonebot | Succeeded to import "pix_show_info"
05-20 08:12:01 [SUCCESS] nonebot | Succeeded to import "pix_gallery"
05-20 08:12:01 [SUCCESS] nonebot | Succeeded to import "ban_hook"
05-20 08:12:01 [SUCCESS] nonebot | Succeeded to import "other_hook"
05-20 08:12:01 [SUCCESS] nonebot | Succeeded to import "chkdsk_hook"
05-20 08:12:01 [SUCCESS] nonebot | Succeeded to import "withdraw_message_hook"
05-20 08:12:01 [SUCCESS] nonebot | Succeeded to import "task_hook"
05-20 08:12:01 [SUCCESS] nonebot | Succeeded to import "auth_hook"
05-20 08:12:01 [SUCCESS] nonebot | Running NoneBot...
05-20 08:12:01 [INFO] uvicorn | Started server process [356]
05-20 08:12:01 [INFO] uvicorn | Waiting for application startup.
05-20 08:12:04 [INFO] services | Database loaded successfully!
C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\apscheduler\triggers\cron\__init__.py:146: PytzUsageWarning: The normalize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return self.timezone.normalize(dateval + difference), fieldnum
C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\apscheduler\triggers\cron\__init__.py:159: PytzUsageWarning: The localize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return self.timezone.localize(datetime(**values))
C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\apscheduler\triggers\interval.py:66: PytzUsageWarning: The normalize method is no longer necessary, as this time zone supports the fold attribute (PEP 495). For more details on migrating to a PEP 495-compliant implementation, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
return self.timezone.normalize(next_fire_time)
05-20 08:12:04 [INFO] nonebot_plugin_apscheduler | Scheduler Started
05-20 08:12:04 [INFO] basic_plugins | 已成功加载 57 个非限制插件.
05-20 08:12:05 [INFO] utils | 已成功加载 5 个Cd限制.
05-20 08:12:05 [INFO] utils | 已成功加载 12 个Block限制.
05-20 08:12:05 [INFO] utils | 已成功加载 1 个Count限制.
05-20 08:12:23 [ERROR] uvicorn | Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\starlette\routing.py", line 621, in lifespan
async with self.lifespan_context(app):
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\starlette\routing.py", line 518, in __aenter__
await self._router.startup()
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\starlette\routing.py", line 600, in startup
handler()
File "C:\qwer\basic_plugins\init_plugin_config\__init__.py", line 53, in _
raise Exception("首次运行,已在configs目录下生成配置文件config.yaml,修改后重启即可...")
Exception: 首次运行,已在configs目录下生成配置文件config.yaml,修改后重启即可...
05-20 08:12:23 [ERROR] uvicorn | Application startup failed. Exiting.
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-D8pZUtqc-py3.9\lib\site-packages\bilibili_api\utils\network.py", line 26, in __clean
loop = asyncio.get_event_loop()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 642, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'MainThread'.
缺个bilibireq,你现在再启动已经能跑了
好的,谢谢——
C:\abaaba>python bot.py Traceback (most recent call last): File "C:\abaaba\bot.py", line 2, in
from nonebot.adapters.onebot.v11 import Adapter
ModuleNotFoundError: No module named 'nonebot.adapters'