Comments (7)
我也是 python 小白,没有遇到过这个错误 orz
感觉可能的尝试:
- 试试用
nb run
来启动,因为我自己都是这样启动的 - 自己新建一个 nb 项目,也选 gocq 相关配置,试试能启动吗?
from pallas-bot.
Windows 可以参考 这个,或者搜索别的教程
from pallas-bot.
非常感谢!
可能是因为配置的原因,服务器无法识别nb
指令,于是我从头重新进行了配置(从部署python-dev开始)。
……
系统提示我requirements.txt的第3行和第21行是一样的,尽管看上去有些差别,但我还是删掉了21行才再次进行配置。
另外,我发现nonebot_plugin_apscheduler
有的时候会因为pyproject.toml
无法部署,我不清楚昨晚造成这个问题的原因是什么,但现在使用了go-cqhttp
自动生成的config后,Pallas已经能成功接收go-cqhttp
的信息了。nb run
已经能启动了。
但由于多次测试“强行教“的时候,Pallas没有给出除上图以外的其他反应,我无法判断是学习次数不够还是出了什么其他的问题。于是我浏览了日志,发现了这一条
03-12 15:53:18 [ERROR] nonebot | Failed to import "repeater"
我想这可能和出现的问题有关
from pallas-bot.
03-12 15:53:18 [ERROR] nonebot | Failed to import "repeater"
是有关的,这个就是牛牛复读的核心插件
启动的时候会依次加载各个插件,看看报啥错
from pallas-bot.
现在,repeater
所需的nonebot_plugin_apscheduler
已经能正常安装,并且安装过程中没有报错。
我先运行了go-cqhttp
,然后启动了Pallas
,并在同时记录了Pallas的启动日志。其中我认为比较重要的部分大致如下
03-12 23:55:54 [ERROR] nonebot | Failed to import "repeater"
Traceback (most recent call last):
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\Scripts\nb.exe_main.py", line 7, in
sys.exit(main())
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1128, in call
return self.main(*args, **kwargs)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 754, in invoke
return _callback(*args, **kwargs)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\commands\main.py", line 30, in run
run_bot(file, app)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\nb_cli\handlers\deploy.py", line 19, in run_bot
module = importlib.import_module(module_name)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in load_unlocked
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "E:\Program\ChatBot\Pallas-Bot.\bot.py", line 24, in
nonebot.load_from_toml("pyproject.toml")
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin_init.py", line 1089, in load_from_toml
return load_all_plugins(set(plugins), set(plugin_dirs))
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin_init.py", line 1031, in load_all_plugins
result = context.run(load_plugin, manager, plugin_name)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin_init.py", line 953, in load_plugin
module = manager.load_plugin(plugin_name)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 161, in load_plugin
return importlib.import_module(f"{self.namespace}.{name}")
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 267, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "E:\Program\ChatBot\Pallas-Bot\bot/plugins\repeater_init.py", line 13, in
from .model import Chat, ChatData
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\plugin\manager.py", line 267, in exec_module
super().exec_module(module)
File "E:\Program\ChatBot\Pallas-Bot\bot/plugins\repeater\model.py", line 26, in
message_mongo.create_index(name='time_index',
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\pymongo\collection.py", line 2101, in create_index
return self.__create_indexes([index], session, **cmd_options)[0]
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\pymongo\collection.py", line 1961, in __create_indexes
with self._socket_for_writes(session) as sock_info:
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\pymongo\collection.py", line 198, in _socket_for_writes
return self.__database.client._socket_for_writes(session)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\pymongo\mongo_client.py", line 1356, in _socket_for_writes
server = self._select_server(writable_server_selector, session)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\pymongo\mongo_client.py", line 1346, in _select_server
server = topology.select_server(server_selector)
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\pymongo\topology.py", line 244, in select_server
return random.choice(self.select_servers(selector,
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\pymongo\topology.py", line 202, in select_servers
server_descriptions = self._select_servers_loop(
File "C:\Users\11240\AppData\Local\Programs\Python\Python310\lib\site-packages\pymongo\topology.py", line 218, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: 127.0.0.1:27017: [WinError 10061] 由于目标计算机积极拒绝,无法连接。, Timeout: 30s, Topology Description: <TopologyDescription id: 622cc26bc2bf6195f411faa2, topology_type: Single, servers: [<ServerDescription ('127.0.0.1', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('127.0.0.1:27017: [WinError 10061] 由于目标计算机积极拒绝,无法连接。')>]>
全部的日志总共有400行左右,但大部分似乎都是因为Pallas与go-cqhttp
对接超时后进行重试产生的。(尽管后来对接成功了)
我搞不懂这部分提示当中的线索。完整的日志内容我会在稍后发到你的hotmail邮箱
from pallas-bot.
你是不是没有配置和启动 MongoDB_(:з」∠)_
from pallas-bot.
我重新检查了MongoDB
的配置情况,它之前似乎没有成功被写进PATH中🦁
(发生的具体原因可能和之前nb
无法被识别类似)
于是在修复并排查了其他问题后,Pallas已经能正常运行了!
非常感谢您的帮助!
from pallas-bot.
Related Issues (20)
- 轮盘伪随机数 bug HOT 5
- 自学习功能的全新概率模型 HOT 2
- 能否作为插件在nb的插件仓库发布呢 HOT 5
- 无视群聊屏蔽的情况 HOT 1
- 你好,这种报错是正常的吗( HOT 3
- 能否让牛牛不复读群友发的图片 HOT 2
- 请问为什么牛牛喝酒之后最后一枪开不出来(我懂了我是SB)
- 安装requirement.txt中的依赖时报错 HOT 1
- 考不考虑出个部署教程视频,文字版对新手部署不太友好 HOT 3
- 关于牛牛的两个问题 HOT 1
- 远程访问 HOT 3
- 怎么屏蔽群里特定一个人的发言 HOT 2
- 机器人是被禁言就自己退群? HOT 1
- 牛牛部署完自己不会说话(?) 教他说话也没有反应 HOT 3
- 请问如何在Docker部署该bot
- 有把chatGPT接入牛牛的计划吗 HOT 2
- 请问牛牛自动加群如何关闭 HOT 1
- 牛牛部署后不说话 HOT 1
- 屏蔽特定用户 HOT 1
- 更新文心API调用方式为异步 HOT 3
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 pallas-bot.