Code Monkey home page Code Monkey logo

nb2-wiki's Introduction

你好啊 ❛‿˂✨

Anurag's GitHub stats

Top Langs

C   11 mins         █████████████████████████   100.00 %

nb2-wiki's People

Contributors

zombiefly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nb2-wiki's Issues

这是网络的问题吗

08-06 16:48:53 [SUCCESS] nonebot | OneBot V11 3373930780 | [message.group.normal]: Message 184346806 from 2922126903@[:874410613] ".wiki 水"
08-06 16:48:53 [INFO] nonebot | Event will be handled by Matcher(type='message', module=src.plugins.nonebot_plugin_permission)
08-06 16:48:53 [INFO] nonebot | Event will be handled by Matcher(type='message', module=src.plugins.nonebot_plugin_permission)
08-06 16:48:53 [INFO] nonebot | Matcher(type='message', module=src.plugins.nonebot_plugin_permission) running complete
08-06 16:48:53 [INFO] nonebot | Matcher(type='message', module=src.plugins.nonebot_plugin_permission) running complete
08-06 16:48:53 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_wiki)
08-06 16:48:56 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_wiki) running complete
08-06 16:48:56 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_wiki) failed.
Traceback (most recent call last):
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\anyio\streams\tls.py", line 130, in _call_sslobject_method
    result = func(*args)
  File "C:\Python311\Lib\ssl.py", line 979, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLSyscallError: Some I/O error occurred (_ssl.c:1002)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\_exceptions.py", line 10, in map_exceptions
    yield
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\backends\asyncio.py", line 78, in start_tls
    raise exc
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\backends\asyncio.py", line 69, in start_tls
    ssl_stream = await anyio.streams.tls.TLSStream.wrap(
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\anyio\streams\tls.py", line 122, in wrap
    await wrapper._call_sslobject_method(ssl_object.do_handshake)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\anyio\streams\tls.py", line 151, in _call_sslobject_method
    raise BrokenResourceError from exc
anyio.BrokenResourceError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
    yield
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\_async\connection_pool.py", line 253, in handle_async_request
    raise exc
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\_async\connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\_async\connection.py", line 86, in handle_async_request
    raise exc
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\_async\connection.py", line 63, in handle_async_request
    stream = await self._connect(request)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\_async\connection.py", line 150, in _connect
    stream = await stream.start_tls(**kwargs)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\backends\asyncio.py", line 66, in start_tls
    with map_exceptions(exc_map):
  File "C:\Python311\Lib\contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc)
httpcore.ConnectError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\BOT\CirnoBot\bot.py", line 28, in <module>
    nonebot.run()
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot\__init__.py", line 273, in run
    get_driver().run(*args, **kwargs)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot\drivers\fastapi.py", line 172, in run
    uvicorn.run(
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\uvicorn\main.py", line 569, in run
    server.run()
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\uvicorn\server.py", line 60, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "C:\Python311\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
  File "C:\Python311\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "C:\Python311\Lib\asyncio\base_events.py", line 640, in run_until_complete
    self.run_forever()
  File "C:\Python311\Lib\asyncio\windows_events.py", line 321, in run_forever
    super().run_forever()
  File "C:\Python311\Lib\asyncio\base_events.py", line 607, in run_forever
    self._run_once()
  File "C:\Python311\Lib\asyncio\base_events.py", line 1922, in _run_once
    handle._run()
  File "C:\Python311\Lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot\message.py", line 142, in _check_matcher
    await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
> File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot\message.py", line 188, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot\internal\matcher\matcher.py", line 727, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot\internal\matcher\matcher.py", line 702, in simple_run
    await handler(
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot\dependencies\__init__.py", line 108, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot_plugin_wiki\__init__.py", line 95, in _search
    outstr = await output(title=keywd, mwiki=state['mwiki'] if state.__contains__('mwiki') else RAW_MWIKI, redirect=True, msg_id=msg_id)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot_plugin_wiki\utils.py", line 66, in output
    curid, _summary = await wiki.summary(
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot_plugin_wiki\mediawiki\wikipedia.py", line 314, in summary
    page_info: WikipediaPage = await page(title, auto_suggest=auto_suggest, redirect=redirect)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot_plugin_wiki\mediawiki\wikipedia.py", line 359, in page
    results, suggestion = await search(title, results=1, suggestion=True)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot_plugin_wiki\mediawiki\wikipedia.py", line 153, in search
    raw_results = await _wiki_request(search_params)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\nonebot_plugin_wiki\mediawiki\wikipedia.py", line 843, in _wiki_request
    r = await client.get(API_URL, params=params, headers=headers)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_client.py", line 1757, in get
    return await self.request(
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_client.py", line 1533, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_client.py", line 1620, in send
    response = await self._send_handling_auth(
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_client.py", line 1648, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_client.py", line 1685, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_client.py", line 1722, in _send_single_request
    response = await transport.handle_async_request(request)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_transports\default.py", line 352, in handle_async_request
    with map_httpcore_exceptions():
  File "C:\Python311\Lib\contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "D:\BOT\CirnoBot\venv\Lib\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError

image

关于一些建议

能否分开设置单个群的wiki列表以及默认wiki和全局的wiki列表默认wiki,还有是否可以不设置全局默认/禁用全局wiki以仅让插件在需要群内生效。

我想在我的插件里面调用nb-wiki

起因是我想在mc(可以直接在服务器里调用命令)里写个wiki,
发现有现成的,那就直接抄吧XD(我调用output里的代码)
但是写完之后发现出来了些莫名其妙的东西,
我也看到了注释# ! 目前重定向可能会出现完全不相干的结果返回
没看明白怎么处理的,请问怎么解决

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.