收藏
回答

获取Access token失败?

  • process_charging_end_indication(msg_dict)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/novel/main.py", line 107, in process_charging_end_indication
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/novel/OperateDB.py", line 17, in get_access_token
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 75, in get
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • return request('get', url, params=params, **kwargs)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • resp = self.send(prep, **send_kwargs)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • r = adapter.send(request, **kwargs)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 514, in send
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • self.sock = ssl_wrap_socket(
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • ssl_sock = _ssl_wrap_socket_impl(
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/ssl.py", line 500, in wrap_socket
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • self._sslobj.do_handshake()
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)
  • 11/26 11:20:59
  • getuserfinfofromwx-014


  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • During handling of the above exception, another exception occurred:
  • 11/26 11:20:59
  • getuserfinfofromwx-014


  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • resp = conn.urlopen(
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • retries = retries.increment(
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
  • 11/26 11:20:59
  • getuserfinfofromwx-014


  • 11/26 11:20:59
  • getuserfinfofromwx-014


  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/threading.py", line 870, in run
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • self._target(*self._args, **self._kwargs)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • self.process_frame(f, frame)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/stomp/transport.py", line 193, in process_frame
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • self.notify(frame_type, f)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • process_received_msg(frame.body)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/novel/main.py", line 46, in process_received_msg
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • accessToken = myDB.get_access_token()
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • response =requests.get(url)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • return session.request(method=method, url=url, **kwargs)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • raise SSLError(e, request=request)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • requests.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:59
  • getuserfinfofromwx-014
  • Exception in thread Thread-36919:
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • Traceback (most recent call last):
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • httplib_response = self._make_request(
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • return self.sslsocket_class._create(
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/ssl.py", line 1040, in _create
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • self.do_handshake()
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/ssl.py", line 1309, in do_handshake
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • Traceback (most recent call last):
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • raise MaxRetryError(_pool, url, error or ResponseError(cause))
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • urllib3.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:59
  • getuserfinfofromwx-014
  • During handling of the above exception, another exception occurred:
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • Traceback (most recent call last):
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • self.run()
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/stomp/transport.py", line 346, in __receiver_loop
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/stomp/transport.py", line 246, in notify
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • notify_func(frame)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/novel/main.py", line 164, in on_message
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • self._validate_conn(conn)
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • conn.connect()
  • 11/26 11:20:59
  • getuserfinfofromwx-014
  • File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 416, in connect


回答关注问题邀请回答
收藏

1 个回答

  • 疯狂的小辣椒
    疯狂的小辣椒
    2021-11-29

    你好,请具体描述下问题流程,并提供下环境ID。

    2021-11-29
    有用
    回复
登录 后发表内容
问题标签