小编Sha*_*lim的帖子

类型错误:“协程”对象不可迭代

我使用 Aiohttp 服务器和 python-socket-io 构建了一个聊天应用程序。当我尝试在 nginx 中托管此应用程序时,我在主管错误日志中发现了此错误(错误日志路径= /var/log/gunicorn/gunicorn.err.log )

[2022-05-27 04:16:31 +0000] [32957] [ERROR] Error handling request
/chatserver Traceback (most recent call last):
File "/home/ubuntu/env/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 136, in handle
    self.handle_request(listener, req, client, addr)
File "/home/ubuntu/env/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 184, in handle_request
    for item in respiter:
TypeError: 'coroutine' object is not iterable
Run Code Online (Sandbox Code Playgroud)

这是我的 aiohttp 服务器设置。

import socketio
from aiohttp import web
import aiohttp_cors


# create aiohttp application
app = web.Application()   


# creates a new Async Socket IO Server
sio = socketio.AsyncServer(
    cors_allowed_origins='*',
    cors_credentials=True …
Run Code Online (Sandbox Code Playgroud)

python coroutine python-asyncio aiohttp python-socketio

5
推荐指数
1
解决办法
2万
查看次数

评估项目“:device_info_plus”时出现问题(flutter 中的问题)

将 flutter 版本更新到 3.10.3 后,我已将 package_info_plus pkg 更新到 4.0.2 版本。此构建失败后。

显示的确切错误是Nosignature of method: build_1mupxig66s099lwbohzx15wgm.android() is apply for argument types

其他详情

gradle-wrapper.properties 中的 distributionUrl distributionUrl=https://services.gradle.org/distributions/gradle-7.3.1-bin.zip

android dart build.gradle flutter flutter-dependencies

4
推荐指数
1
解决办法
4239
查看次数