Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

搜图后出现expected string or bytes-like object报错 #36

Closed
avadiana opened this issue Aug 20, 2022 · 4 comments
Closed

搜图后出现expected string or bytes-like object报错 #36

avadiana opened this issue Aug 20, 2022 · 4 comments
Labels
need investigation need investigation question Further information is requested

Comments

@avadiana
Copy link

大佬,我的配置是这个image,搜图后无论是哪个网站,都会显示如下报错
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/usr/local/lib/python3.9/multiprocessing/spawn.py", line 129, in _main
return self._bootstrap(parent_sentinel)
File "/usr/local/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/local/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.9/site-packages/nonebot/message.py", line 146, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "/usr/local/lib/python3.9/site-packages/nonebot/message.py", line 196, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/usr/local/lib/python3.9/site-packages/nonebot/internal/matcher.py", line 672, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/usr/local/lib/python3.9/site-packages/nonebot/internal/matcher.py", line 639, in simple_run
await handler(
File "/usr/local/lib/python3.9/site-packages/nonebot/dependencies/init.py", line 92, in call
return await self.call(**values)
File "/usr/local/lib/python3.9/site-packages/nonebot_plugin_picsearcher/init.py", line 85, in get_setu
msgs: Message = sum(
File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/onebot/v11/message.py", line 284, in radd
return super(Message, self).radd(
File "/usr/local/lib/python3.9/site-packages/nonebot/internal/adapter/message.py", line 178, in radd
result = self.class(other)
File "/usr/local/lib/python3.9/site-packages/nonebot/internal/adapter/message.py", line 117, in init
self.extend(self._construct(message)) # pragma: no cover
File "/usr/local/lib/python3.9/site-packages/nonebot/internal/adapter/message.py", line 311, in extend
for segment in obj:
File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/onebot/v11/message.py", line 313, in construct
for type
, data in _iter_message(msg):
File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/onebot/v11/message.py", line 301, in _iter_message
for cqcode in re.finditer(
File "/usr/local/lib/python3.9/re.py", line 248, in finditer
return _compile(pattern, flags).finditer(string)
TypeError: expected string or bytes-like object
大佬能帮忙看看是什么原因吗

@synodriver
Copy link
Owner

这个似乎不是我的问题

@synodriver synodriver added question Further information is requested need investigation need investigation labels Aug 29, 2022
@synodriver
Copy link
Owner

synodriver commented Nov 4, 2022

pip install nonebot-plugin-picsearcher==0.1.9.dev1 治标先

@synodriver
Copy link
Owner

synodriver commented Nov 5, 2022

pip install -U nonebot-plugin-picsearcher 彻底修好了

@synodriver synodriver pinned this issue Nov 5, 2022
@synodriver
Copy link
Owner

synodriver commented Nov 5, 2022

sum函数和更新后的nb发生了奇妙的反应,导致一个0被塞进了re.compile,已经更新了,顺便优化了性能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need investigation need investigation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants