Closed ck7968 closed 1 year ago
我也遇到这个问题了,请问楼主解决了吗,求救!我的wx:swh526473035
应该是你机器上的cryptography包是旧版的,旧版的cryptography的这个类的初始化backend参数是必须传入的,新版的是optional的。
pip install cryptography==35.0.0
应该是你机器上的cryptography包是旧版的,旧版的cryptography的这个类的初始化backend参数是必须传入的,新版的是optional的。
pip install cryptography==35.0.0
解决了,谢谢!
提示openapi回调地址请求不通过 服务器这边报错:[2023-04-13 16:07:31,266] ERROR in app: Exception on /wechat [GET] Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2528, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "/root/bot-on-anything/channel/wechat/wechat_com_channel.py", line 27, in handler_msg return WechatEnterpriseChannel().handle() File "/root/bot-on-anything/channel/wechat/wechat_com_channel.py", line 72, in handle echostr = self.crypto.check_signature(signature, timestamp, nonce, echostr) File "/usr/local/lib/python3.8/dist-packages/wechatpy/enterprise/crypto.py", line 23, in check_signature return self._check_signature( File "/usr/local/lib/python3.8/dist-packages/wechatpy/crypto/init.py", line 60, in _check_signature pc = crypto_class(self.key) File "/usr/local/lib/python3.8/dist-packages/wechatpy/crypto/base.py", line 21, in init self.cipher = WeChatCipher(key) File "/usr/local/lib/python3.8/dist-packages/wechatpy/crypto/cryptography.py", line 25, in init Cipher( TypeError: init() missing 1 required positional argument: 'backend'