小程序
小游戏
企业微信
微信支付
扫描小程序码分享
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.mch.weixin.qq.com', port=443): Max retries exceeded with url: /secapi/pay/refund (Caused by SSLError(SSLError(336445449, '[SSL] PEM lib (_ssl.c:3401)'),))
请问是什么情况,证书路径已经配置了
MacOS, Python3.6
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
Error handling request
Traceback (most recent call last):
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn
conn.connect()
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connection.py", line 370, in connect
ssl_context=context,
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 365, in ssl_wrap_socket
context.load_cert_chain(certfile, keyfile)
ssl.SSLError: [SSL] PEM lib (_ssl.c:3401)
During handling of the above exception, another exception occurred:
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connectionpool.py", line 725, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.mch.weixin.qq.com', port=443): Max retries exceeded with url: /secapi/pay/refund (Caused by SSLError(SSLError(336445449, '[SSL] PEM lib (_ssl.c:3401)'),))
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 381, in start
resp = await self._request_handler(request)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/aiohttp/web_app.py", line 310, in _handle
resp = await handler(request)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 88, in impl
return await handler(request)
File "/Users/wuyazi/italki/mississippi/src/middlewares/error.py", line 11, in middleware_handler
response = await handler(request)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/aiohttp/web_urldispatcher.py", line 741, in _iter
resp = await method()
File "/Users/wuyazi/italki/mississippi/src/common/validate.py", line 31, in wrapper
return await func(self, *args, **kwargs)
File "/Users/wuyazi/italki/mississippi/src/apis/refund.py", line 35, in post
fee_type=params.get('fee_type', 'CNY'))
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/wechatpy/pay/api/refund.py", line 43, in apply
return self._post('secapi/pay/refund', data=data)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/wechatpy/pay/base.py", line 18, in _post
return self._client.post(url, **kwargs)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/wechatpy/pay/__init__.py", line 193, in post
**kwargs
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/wechatpy/pay/__init__.py", line 138, in _request
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
Error handling request
Traceback (most recent call last):
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn
conn.connect()
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connection.py", line 370, in connect
ssl_context=context,
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 365, in ssl_wrap_socket
context.load_cert_chain(certfile, keyfile)
ssl.SSLError: [SSL] PEM lib (_ssl.c:3401)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/connectionpool.py", line 725, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.mch.weixin.qq.com', port=443): Max retries exceeded with url: /secapi/pay/refund (Caused by SSLError(SSLError(336445449, '[SSL] PEM lib (_ssl.c:3401)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 381, in start
resp = await self._request_handler(request)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/aiohttp/web_app.py", line 310, in _handle
resp = await handler(request)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 88, in impl
return await handler(request)
File "/Users/wuyazi/italki/mississippi/src/middlewares/error.py", line 11, in middleware_handler
response = await handler(request)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/aiohttp/web_urldispatcher.py", line 741, in _iter
resp = await method()
File "/Users/wuyazi/italki/mississippi/src/common/validate.py", line 31, in wrapper
return await func(self, *args, **kwargs)
File "/Users/wuyazi/italki/mississippi/src/apis/refund.py", line 35, in post
fee_type=params.get('fee_type', 'CNY'))
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/wechatpy/pay/api/refund.py", line 43, in apply
return self._post('secapi/pay/refund', data=data)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/wechatpy/pay/base.py", line 18, in _post
return self._client.post(url, **kwargs)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/wechatpy/pay/__init__.py", line 193, in post
**kwargs
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/wechatpy/pay/__init__.py", line 138, in _request
**kwargs
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/Users/wuyazi/.local/share/virtualenvs/mississippi-uec03K_7/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.mch.weixin.qq.com', port=443): Max retries exceeded with url: /secapi/pay/refund (Caused by SSLError(SSLError(336445449, '[SSL] PEM lib (_ssl.c:3401)'),))