Giter VIP home page Giter VIP logo

nonebot-plugin-eitherchoice's People

Contributors

lgc2333 avatar

Stargazers

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

Watchers

 avatar

Forkers

wanghaisheng

nonebot-plugin-eitherchoice's Issues

插件报错

Traceback (most recent call last):
  File "D:\NoneBot\ABK\bot.py", line 21, in <module>
    nonebot.run()
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot\__init__.py", line 309, in run
    get_driver().run(*args, **kwargs)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 198, in run
    uvicorn.run(
  File "D:\NoneBot\ABK\.venv\lib\site-packages\uvicorn\main.py", line 578, in run
    server.run()
  File "D:\NoneBot\ABK\.venv\lib\site-packages\uvicorn\server.py", line 61, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
    super().run_forever()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 603, in run_forever
    self._run_once()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1909, in _run_once
    handle._run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot\message.py", line 467, in check_and_run_matcher
    await _run_matcher(
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot\message.py", line 419, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 753, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 728, in simple_run
    await handler(
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot\dependencies\__init__.py", line 108, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
> File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot_plugin_eitherchoice\__main__.py", line 42, in _
    pic = await get_choice_pic(*things)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot_plugin_eitherchoice\data_source.py", line 139, in get_choice_pic
    return await render_image(thing_a, thing_b, await get_choice_all(thing_a, thing_b))
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot_plugin_eitherchoice\data_source.py", line 134, in get_choice_all
    return await get_choice_all(thing_a, thing_b, retry, referer)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot_plugin_eitherchoice\data_source.py", line 128, in get_choice_all
    return "".join([i async for i in get_choice_stream(thing_a, thing_b, referer)])
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot_plugin_eitherchoice\data_source.py", line 128, in <listcomp>
    return "".join([i async for i in get_choice_stream(thing_a, thing_b, referer)])
  File "D:\NoneBot\ABK\.venv\lib\site-packages\nonebot_plugin_eitherchoice\data_source.py", line 106, in get_choice_stream
    async with client.stream(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpx\_client.py", line 1573, in stream
    response = await self.send(
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpx\_client.py", line 1617, in send
    response = await self._send_handling_auth(
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpx\_client.py", line 1645, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpx\_client.py", line 1682, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpx\_client.py", line 1719, in _send_single_request
    response = await transport.handle_async_request(request)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpcore\_async\connection_pool.py", line 253, in handle_async_request
    raise exc
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpcore\_async\connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpcore\_async\socks_proxy.py", line 290, in handle_async_request
    raise exc
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpcore\_async\socks_proxy.py", line 238, in handle_async_request
    await _init_socks5_connection(**kwargs)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\httpcore\_async\socks_proxy.py", line 93, in _init_socks5_connection
    response = conn.receive_data(incoming_bytes)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\socksio\socks5.py", line 382, in receive_data
    reply = SOCKS5Reply.loads(data)
  File "D:\NoneBot\ABK\.venv\lib\site-packages\socksio\socks5.py", line 262, in loads
    addr=decode_address(AddressType.from_socks5_atype(atype), data[4:-2]),
TypeError: unhashable type: 'bytearray'

生成图片清晰度较低与排版

调高EITHER_CHOICE_PIC_WIDTH还有代码内viewport的height也仅会让图片整体宽度更大,高度反而会降低,清晰度并没有变化。可否有方法提高生成图片的清晰度呢?
c46ff194dc9ad7f333b815c22dc1cfc8
ce72def968cc23c1e477c13328ffc76f
22d2fc6d12bc9e85665c4949ed17f63b

playwright加载页面超时

KT%F`6 TQ{)6JA3IUMWW XR

如图(抱歉只存了截图)playwright加载页面有一个30秒的默认timeout,可能是我服务器性能太差导致的?把data_source.py的第56行改为
await page.goto(RES_PATH.as_uri(),timeout=0)
后解决了

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.