-
Notifications
You must be signed in to change notification settings - Fork 81
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
上传报错 #48
Comments
更新地址来源 None 还有个这个报错 |
component-->db_op.py-->exe_tidb: |
抱歉,最近比较忙才看到,是可以这样解的。非常感谢您提供的用例。我验证一下,没问题的话会合到代码里。贡献列表里会加上您的Github主页。 |
感谢大佬的反馈,请问这个是具体什么端SDK上报的?我用小程序批量上报和Web单条尝试暂时没能复现出这个场景。 |
非常感谢大佬的代码。在这里做了修复。已加贡献列表。 |
获取参数的时候,拿到json的参数,但是类型是str的,所以加了层处理,现在没有了: 核心是request.json 拿到不是一个字典,是一个str。try:
got_json = request.json
except: # noqa
got_json = None
v = None
if got_json:
# 判断这个json的类型
if type(got_json) == str:
tmpList = got_json.split("=")
if len(tmpList) >= 2:
if params == tmpList[0]:
# 处理字符串
v = tmpList[1]
else:
。。。。。
对着镜子说加油
***@***.***
…------------------ 原始邮件 ------------------
发件人: "white-shiro-bai/ghost_sa" ***@***.***>;
发送时间: 2023年10月29日(星期天) 下午4:48
***@***.***>;
***@***.******@***.***>;
主题: Re: [white-shiro-bai/ghost_sa] 上传报错 (Issue #48)
更新地址来源 None 回调DSP None 2023-08-23 17:49:36.511911,get_datas,Traceback (most recent call last): File "/data/ghost-server/component/api.py", line 139, in get_datas return get_data() File "/data/ghost-server/component/api.py", line 112, in get_data if get_url_params('data'): File "/data/ghost-server/component/url_tools.py", line 45, in get_url_params v = got_json[params] TypeError: string indices must be integers
还有个这个报错
感谢大佬的反馈,请问这个是具体什么端SDK上报的?我用小程序批量上报和Web单条尝试暂时没能复现出这个场景。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@shenhongbin7854 |
File "/data/ghost-server/component/db_op.py", line 64, in do_tidb_exe
results, result_count , lastest_id = exe_tidb(sql=sql, args=args,presql=presql)
File "/data/ghost-server/component/db_op.py", line 31, in exe_tidb
result_count = cur.execute(query=sql, args=args)
File "/data/python3/lib/python3.10/site-packages/pymysql/cursors.py", line 148, in execute
result = self._query(query)
File "/data/python3/lib/python3.10/site-packages/pymysql/cursors.py", line 310, in _query
conn.query(q)
File "/data/python3/lib/python3.10/site-packages/pymysql/connections.py", line 546, in query
sql = sql.encode(self.encoding, "surrogateescape")
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 1780-1781: surrogates not allowed
我们切了一些流量到鬼策:
"$url": "pages-shop/assistant/index?item={\"id\":6497,\"spuId\":136767,\"content\":\"2.5mm超薄饼胚\\n咔滋咔滋<U+2728>满口酥脆不粘牙\\n咬上一口,满满的芝士香气喷涌而出\\n让人意犹未尽☀\\n下单\ud83d\udc49https://dwz.cn/SFaxkQWt\\",\\"friendContent\\":\\"\\\\n下单\ud83d\udc49https://dwz.cn/SFaxkQWt\\",\\"video\\":\\"\\",\\"videoCover\\":\\"\\",\\"imageList\\":[\\"https://cdn.huoduomei.com/middle-other/web/img/bb094650-59c5-11ed-b58f-8b3b94211c81.jpeg\\",\\"https://cdn.huoduomei.com/middle-other/web/img/ce7c37b0-59c5-11ed-b58f-8b3b94211c81.jpeg\\",\\"https://cdn.huoduomei.com/middle-other/web/img/bb099470-59c5-11ed-b58f-8b3b9421",
这个是不是因为emoj 表情的问题
The text was updated successfully, but these errors were encountered: