testerSunshine / 12306

12306智能刷票,订票
MIT License
33.89k stars 9.79k forks source link

运行报错 #823

Closed lsz876 closed 3 years ago

lsz876 commented 3 years ago

描述问题

使用requirements.txt安装的依赖,配置的是本地识别,运行时就会报错

重现步骤

python run.py r

截图&日志 Traceback (most recent call last): File "run.py", line 21, in from init import select_ticket_info File "/home/lsz/workspace/12306/init/select_ticket_info.py", line 16, in from init.login import GoLogin File "/home/lsz/workspace/12306/init/login.py", line 8, in from inter.GetRandCode import getRandCode File "/home/lsz/workspace/12306/inter/GetRandCode.py", line 12, in v = Verify() File "/home/lsz/workspace/12306/verify/localVerifyCode.py", line 49, in init self.loadImgModel() File "/home/lsz/workspace/12306/verify/localVerifyCode.py", line 60, in loadImgModel self.imgModel = models.load_model(PATH('../12306.image.model.h5')) File "/home/lsz/anaconda3/envs/py3.6/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model model = _deserialize_model(f, custom_objects, compile) File "/home/lsz/anaconda3/envs/py3.6/lib/python3.6/site-packages/keras/engine/saving.py", line 224, in _deserialize_model model_config = json.loads(model_config.decode('utf-8')) AttributeError: 'str' object has no attribute 'decode' 环境信息

额外的备注

lsz876 commented 3 years ago

pip install 'h5py==2.10.0' --force-reinstall 可以解决此问题。https://stackoverflow.com/questions/53740577/does-any-one-got-attributeerror-str-object-has-no-attribute-decode-whi