- 云函数查询数据库的最后一千条,突然出错,已正常运行大半年,最近突然返回的数据会跳过很多记录.....
如下在云函数中代码,期望返回的是最后1000条记录,之前都是正常返回的,最近突然出现返回的记录里面漏掉很多的情况? 总数还是1000条,但根本不是最新的1000条,而是跳着来。很奇怪。 [图片]
2022-11-18 - wx.cloud.callFunction这个函数调用无反应?
wx.showLoading({ title: '加载中', }) log.info("uni_order_num:", that.data.uni_order_num, "total_fee", that.data.selectedInfo.selectedFee) try { //console.log("uni_order_num:", that.data.uni_order_num, "total_fee", that.data.selectedInfo.selectedFee) wx.cloud.callFunction({ name: "payment", data: { command: "pay", out_trade_no: that.data.uni_order_num, body: '充电付款', total_fee: that.data.selectedInfo.selectedFee }, success(res) { console.log("云函数payment提交成功:", res.result) wx.hideLoading() that.pay(res.result) }, fail(res) { console.log("云函数payment提交失败:", res) wx.hideLoading() } }) } catch(error) { wx.hideLoading() console.log(error) log.warn(error) } }, 上述这段代码调用后, log.info("uni_order_num:", that.data.uni_order_num, "total_fee", that.data.selectedInfo.selectedFee)这行打印能在公众平台上看到,但是没有后面的云函数的调用信息,从云平台上看不到,这个问题是偶现的,不是每个手机都会出现,但出现问题的手机是必现的,有哪位大神能知道是为什么吗?
2022-03-08 - 获取Access token失败?
process_charging_end_indication(msg_dict)11/26 11:20:59getuserfinfofromwx-014 File "/novel/main.py", line 107, in process_charging_end_indication11/26 11:20:59getuserfinfofromwx-014 File "/novel/OperateDB.py", line 17, in get_access_token11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 75, in get11/26 11:20:59getuserfinfofromwx-014 return request('get', url, params=params, **kwargs)11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request11/26 11:20:59getuserfinfofromwx-014 resp = self.send(prep, **send_kwargs)11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send11/26 11:20:59getuserfinfofromwx-014 r = adapter.send(request, **kwargs)11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 514, in send11/26 11:20:59getuserfinfofromwx-014 self.sock = ssl_wrap_socket(11/26 11:20:59getuserfinfofromwx-014 ssl_sock = _ssl_wrap_socket_impl(11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/ssl.py", line 500, in wrap_socket11/26 11:20:59getuserfinfofromwx-014 self._sslobj.do_handshake()11/26 11:20:59getuserfinfofromwx-014ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)11/26 11:20:59getuserfinfofromwx-014 11/26 11:20:59getuserfinfofromwx-014During handling of the above exception, another exception occurred:11/26 11:20:59getuserfinfofromwx-014 11/26 11:20:59getuserfinfofromwx-014 resp = conn.urlopen(11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen11/26 11:20:59getuserfinfofromwx-014 retries = retries.increment(11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment11/26 11:20:59getuserfinfofromwx-014 11/26 11:20:59getuserfinfofromwx-014 11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/threading.py", line 870, in run11/26 11:20:59getuserfinfofromwx-014 self._target(*self._args, **self._kwargs)11/26 11:20:59getuserfinfofromwx-014 self.process_frame(f, frame)11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/stomp/transport.py", line 193, in process_frame11/26 11:20:59getuserfinfofromwx-014 self.notify(frame_type, f)11/26 11:20:59getuserfinfofromwx-014 process_received_msg(frame.body) 11/26 11:20:59getuserfinfofromwx-014 File "/novel/main.py", line 46, in process_received_msg11/26 11:20:59getuserfinfofromwx-014 accessToken = myDB.get_access_token()11/26 11:20:59getuserfinfofromwx-014 response =requests.get(url)11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request11/26 11:20:59getuserfinfofromwx-014 return session.request(method=method, url=url, **kwargs)11/26 11:20:59getuserfinfofromwx-014 raise SSLError(e, request=request)11/26 11:20:59getuserfinfofromwx-014requests.exceptions.SSLError: HTTPSConnectionPool(host='api.weixin.qq.com', port=443): Max retries exceeded with url: /cgi-bin/token?grant_type=client_credential&appid=xxxxxxxx&secret=xxxxxxxxxxxxxx (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)')))更多11/26 11:20:59getuserfinfofromwx-014Exception in thread Thread-36919:11/26 11:20:59getuserfinfofromwx-014Traceback (most recent call last):11/26 11:20:59getuserfinfofromwx-014 httplib_response = self._make_request(11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket11/26 11:20:59getuserfinfofromwx-014 return ssl_context.wrap_socket(sock, server_hostname=server_hostname)11/26 11:20:59getuserfinfofromwx-014 return self.sslsocket_class._create(11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/ssl.py", line 1040, in _create11/26 11:20:59getuserfinfofromwx-014 self.do_handshake()11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/ssl.py", line 1309, in do_handshake11/26 11:20:59getuserfinfofromwx-014Traceback (most recent call last):11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send11/26 11:20:59getuserfinfofromwx-014 raise MaxRetryError(_pool, url, error or ResponseError(cause))11/26 11:20:59getuserfinfofromwx-014urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.weixin.qq.com', port=443): Max retries exceeded with url: /cgi-bin/token?grant_type=client_credential&appid=xxxxxxxxxxxxx&secret=xxxxxxxxxxx(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)')))更多11/26 11:20:59getuserfinfofromwx-014During handling of the above exception, another exception occurred:11/26 11:20:59getuserfinfofromwx-014Traceback (most recent call last):11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner11/26 11:20:59getuserfinfofromwx-014 self.run()11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/stomp/transport.py", line 346, in __receiver_loop11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/stomp/transport.py", line 246, in notify11/26 11:20:59getuserfinfofromwx-014 notify_func(frame)11/26 11:20:59getuserfinfofromwx-014 File "/novel/main.py", line 164, in on_message11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen11/26 11:20:59getuserfinfofromwx-014 self._validate_conn(conn)11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn11/26 11:20:59getuserfinfofromwx-014 conn.connect()11/26 11:20:59getuserfinfofromwx-014 File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 416, in connect
2021-11-26 - https://iot.cn-shanghai.aliyuncs.com不在以下 request?
https://iot.cn-shanghai.aliyuncs.com 不在以下 request 合法域名列表中,请参考文档:https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html(env: Windows,mp,1.05.2110110; lib: 2.20.0) 但我有在小程序正常设置这个域名,并且也有多次启动过开发者工具 request合法域名https://iot.cn-shanghi.aliyuncs.com
2021-10-30