youthlearning / teenstudy Goto Github PK
View Code? Open in Web Editor NEW基于nonebot2和OneBot V11协议的青年大学习自动提交插件,用于自动完成最新一期青年大学习,在后台留下记录,返回完成截图
License: MIT License
基于nonebot2和OneBot V11协议的青年大学习自动提交插件,用于自动完成最新一期青年大学习,在后台留下记录,返回完成截图
License: MIT License
11-16 20:08:31 [ERROR] uvicorn | Traceback (most recent call last):
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 114, in connect_tcp
stream: anyio.abc.ByteStream = await anyio.connect_tcp(
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 221, in connect_tcp
await event.wait()
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 597, in aexit
raise exceptions[0]
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 167, in try_connect
stream = await asynclib.connect_tcp(remote_host, remote_port, local_address)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 1627, in connect_tcp
await get_running_loop().create_connection(
File "uvloop/loop.pyx", line 2029, in create_connection
File "uvloop/loop.pyx", line 2016, in uvloop.loop.Loop.create_connection
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
yield
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 121, in connect_tcp
stream._raw_socket.setsockopt(*option) # type: ignore[attr-defined] # pragma: no cover
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/anyio/_core/_tasks.py", line 119, in exit
raise TimeoutError
TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request
raise exc
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request
response = await connection.handle_async_request(request)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_async/connection.py", line 92, in handle_async_request
raise exc
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_async/connection.py", line 69, in handle_async_request
stream = await self._connect(request)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_async/connection.py", line 117, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp
return await self._backend.connect_tcp(
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 121, in connect_tcp
stream._raw_socket.setsockopt(*option) # type: ignore[attr-defined] # pragma: no cover
File "/home/ubuntu/anaconda3/lib/python3.9/contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectTimeout
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/starlette/routing.py", line 677, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "/home/ubuntu/anaconda3/lib/python3.9/contextlib.py", line 181, in aenter
return await self.gen.anext()
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/nonebot/drivers/fastapi.py", line 168, in _lifespan_manager
await self._lifespan.startup()
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/nonebot/drivers/_lifespan.py", line 36, in startup
await self._run_lifespan_func(self._startup_funcs)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/nonebot/drivers/_lifespan.py", line 30, in _run_lifespan_func
await cast(ASYNC_LIFESPAN_FUNC, func)()
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/TeenStudy/init.py", line 30, in startup
await utils.update.update_answer()
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/TeenStudy/utils/update.py", line 86, in update_answer
response = await client.get(url=resp_url, timeout=10)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_client.py", line 1757, in get
return await self.request(
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_client.py", line 1530, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_client.py", line 1617, in send
response = await self._send_handling_auth(
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/home/ubuntu/anaconda3/lib/python3.9/contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "/home/ubuntu/bot001/.venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectTimeout
11-16 20:08:31 [ERROR] uvicorn | Application startup failed. Exiting.
希望增加烟台地区
经过本人测试,安徽的大学习进入到个人信息界面是通过get请求来发送token的,因此只需要正常打开个人信息界面并复制链接就可以得到自己的token,其他信息同样按照个人信息界面填写就可以正常使用了
谢谢大神
经测试,个人信息二维码扫描后转到的ip为局域网ip,无法访问
希望能够快一点适配,谢谢
普通版有安徽,我看这个没有,这俩除了web有啥其他区别嘛
当前pypi 0.1.3版本,nonebot2.0.0rc3
03-14 13:43:00 [ERROR] nonebot | Running Matcher(type='message', module=TeenStudy.utils.handle) failed.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/usr/lib/python3.9/multiprocessing/spawn.py", line 129, in _main
return self._bootstrap(parent_sentinel)
File "/usr/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/dist-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "/usr/local/lib/python3.9/dist-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.9/dist-packages/nonebot/message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
> File "/usr/local/lib/python3.9/dist-packages/nonebot/message.py", line 187, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/usr/local/lib/python3.9/dist-packages/nonebot/internal/matcher/matcher.py", line 732, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/usr/local/lib/python3.9/dist-packages/nonebot/internal/matcher/matcher.py", line 707, in simple_run
await handler(
File "/usr/local/lib/python3.9/dist-packages/nonebot/dependencies/__init__.py", line 108, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "/usr/local/lib/python3.9/dist-packages/TeenStudy/utils/handle.py", line 34, in test_
await end_pic.finish(message=MessageSegment.image(await get_end_pic()))
File "/usr/local/lib/python3.9/dist-packages/TeenStudy/utils/utils.py", line 194, in get_end_pic
bg_img = Image.open(BytesIO(backgrouds[random.randint(0, 4)]['file']))
IndexError: list index out of range
site-packages\TeenStudy\utils\utils.py", line 178, in admin_init
result = await Admin.filter(user_id=int(list(SUPERS)[0]), ip=ip).count()
IndexError: list index out of range
不知道能不能改成字符串
群聊中“添加大学习”等指令无法被正常触发,删除https://github.com/ZM25XC/TeenStudy/blob/main/TeenStudy/utils/handle.py#L24-L39
中rule=must_group部分后正常触发
吉林地区老版本插件仍能正常提交
希望适配
感谢大佬
能否在配置文件中添加一项(例如DXX_ADDR=example.com), 用于拼接到回复的地址中,这样不仅可以较好的隐藏IP地址,还便于配置反向代理。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.