Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[求助] 程序报错:无效路径、JSON #78

Closed
xfrqh opened this issue Aug 16, 2023 · 1 comment
Closed

[求助] 程序报错:无效路径、JSON #78

xfrqh opened this issue Aug 16, 2023 · 1 comment

Comments

@xfrqh
Copy link

xfrqh commented Aug 16, 2023

复现

阿里云云函数搭建说明 完成部署

发送请求
image
报错:{"code": -6, "msg": "invalid path info"}

将程序中的 if path_info == "/": 改为 if True: 来尝试跳过此问题。

再次发送相同请求
报错:{"code": -1, "msg": "invalid json input"}

日志

FC Invoke Start RequestId: 1-64dd3eef-ba945220b77ec629e29c7ed9

2023-08-17 05:26:07 1-64dd3eef-ba945220b77ec629e29c7ed9 [INFO] request body: 
2023-08-17 05:26:07 1-64dd3eef-ba945220b77ec629e29c7ed9 [INFO] path_info: None
None
FC Invoke End RequestId: 1-64dd3eef-ba945220b77ec629e29c7ed9

PHP版搭建说明 完成部署

发送请求

# python

import requests
import json

url = "http://x.xxx:5039/"
headers = {
    "Content-Type": "application/json"
}

data = {
    "sendkey": "x",
    "msg_type": "markdown",
    "msg": "Markdown Here!"
}

response = requests.post(url, headers=headers, data=json.dumps(data))

if response.status_code == 200:
    print("POST request sent successfully!")
    print("Response:")
    print(response.text)
else:
    print("Failed to send POST request. Status code:", response.status_code)

回复:bad params

我的操作有问题吗,为什么会这样?

@xfrqh
Copy link
Author

xfrqh commented Aug 16, 2023

11
おむたつ/omutatsu  96426142_p0 こっち向いて!
我很❤喜欢❤这个项目,它对我很重要🍰:推送NAS的番剧下载情况。希望大佬给小白指点迷津。🧐

@xfrqh xfrqh closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant