celery任务报错:scheme https is invalid
使用websocket报错:scheme https is invalid
@app.task
def mes_push():
num = 1
try:
ws = create_connection("ws://127.0.0.1/ws/applyconf")
except Exception as e:
print(e)
while num < 5:
ws.send("applyconf")
time.sleep(5)
num += 1
ws.close()
我这里用到的是ws,并没有使用https,他告诉我https方案无效
当我修改成https的时候它还是报这个
ws = create_connection("https://127.0.0.1/ws/applyconf")
[2021-08-30 10:58:39,931: WARNING/ForkPoolWorker-4] scheme https is invalid
我又尝试将https换成wss结果
ws = create_connection("https://127.0.0.1/ws/applyconf")
[2021-08-30 11:03:55,111: WARNING/ForkPoolWorker-4] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)
我现在无能为力了,请求大神帮助!!!