uezo / aiolinebot Goto Github PK
View Code? Open in Web Editor NEWAioLineBotApi provides asynchronous interface for LINE messaging API
License: Other
AioLineBotApi provides asynchronous interface for LINE messaging API
License: Other
This is an error log from await api.reply_message_async(
TimeoutError: null
File "starlette/exceptions.py", line 82, in __call__
raise exc from None
File "starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "starlette/routing.py", line 566, in __call__
await route.handle(scope, receive, send)
File "starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "starlette/routing.py", line 41, in app
response = await func(request)
File "fastapi/routing.py", line 182, in app
raw_response = await run_endpoint_function(
File "fastapi/routing.py", line 133, in run_endpoint_function
return await dependant.call(**values)
File "api/v1/webhooks/line.py", line 26, in handle_line_webhook
await handler.handle_async(body, signature)
File "linebot/webhook.py", line 325, in handle_async
await self.__invoke_func_async(func, event, payload)
File "linebot/webhook.py", line 352, in __invoke_func_async
await function_return
File "chatbot/handlers.py", line 43, in handle_message
await response_to_magic_word(event)
File "chatbot/conversations/all.py", line 104, in response_to_magic_word
await api.reply_message_async(
File "aiolinebot/api.py", line 1064, in reply_message_async
await self._post_async(
File "aiolinebot/api.py", line 1244, in _post_async
response = await self.aiohttp_client.post(
File "aiolinebot/http_client.py", line 154, in post
async with client_session.post(
File "aiohttp/client.py", line 1117, in __aenter__
self._resp = await self._coro
File "aiohttp/client.py", line 619, in _request
break
File "aiohttp/helpers.py", line 656, in __exit__
raise asyncio.TimeoutError from None
I think auto generate api.py
has some issues.
File "/sss/backend/app/models/_common.py", line 41, in get_starting_name
group_summary = await api.get_group_summary_async(self)
File "/sss/backend/.venv/lib/python3.8/site-packages/aiolinebot/api.py", line 302, in get_group_summary_async
return Group.new_from_json_dict(response.json)
NameError: name 'Group' is not defined
poetry add git+https://github.com/CircleOnCircles/aiolinebot.git#put-missing
PackageInfoError
Unable to determine package info for path: C:\Users\n2\AppData\Local\Temp\pypoetry-git-aiolinebo_u6ztofg
Fallback egg_info generation failed.
Command C:\Users\n2\AppData\Local\Temp\tmpwkp710lo\.venv\Scripts\python.exe setup.py egg_info errored with the following return code 1, and output:
Traceback (most recent call last):
File "setup.py", line 2, in <module>
from aiolinebot import __version__
File "C:\Users\n2\AppData\Local\Temp\pypoetry-git-aiolinebo_u6ztofg\aiolinebot\__init__.py", line 1, in <module>
from linebot import __version__ as linebot_version
ModuleNotFoundError: No module named 'linebot'
at ~\.poetry\lib\poetry\inspection\info.py:502 in _pep517_metadata
498│ try:
499│ venv.run("python", "setup.py", "egg_info")
500│ return cls.from_metadata(path)
501│ except EnvCommandError as fbe:
→ 502│ raise PackageInfoError(
503│ path, "Fallback egg_info generation failed.", fbe
504│ )
505│ finally:
506│ os.chdir(cwd.as_posix())
Because from what I have obeserved, almost upto 40-60% of the time consumed in sending a web request comes from creating a session and one of core concepts of aiohttp and other similar libraries like httpx resolves around the fact that sessions could be reused.
In my app I was able to achieve a reduction of upto 50% response time when using a global session which refreshes after a certain period of time, ofc it is cumbersome to use without being it integrated into the library, but anyways it was just a test case.
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.