minium的版本是1.2.0的
运行以上代码的时候报了下面的错
重新安装会1.0.6的版本运行以上代码的时候就能正常运行不会报错
Traceback (most recent call last):
File "E:\pycharm\winxuanjiuyue\demo.py", line 12, in <module>
mini = minium.Minium({
File "D:\Programs\Python\Python39\lib\site-packages\minium\__init__.py", line 20, in Minium
return get_minium_driver(conf, *args, **kwargs)
File "D:\Programs\Python\Python39\lib\site-packages\minium\miniprogram\__init__.py", line 28, in get_minium_driver
return APP[application](conf, *args, **kwargs)
File "D:\Programs\Python\Python39\lib\site-packages\minium\miniprogram\wx_minium.py", line 110, in __init__
self.launch_dev_tool()
File "D:\Programs\Python\Python39\lib\site-packages\minium\miniprogram\base_driver\minium_log.py", line 135, in wrapper
result = func(*args, **kwargs)
File "D:\Programs\Python\Python39\lib\site-packages\minium\miniprogram\wx_minium.py", line 200, in launch_dev_tool
self._get_sdk_version()
File "D:\Programs\Python\Python39\lib\site-packages\minium\miniprogram\wx_minium.py", line 166, in _get_sdk_version
self.sdk_version = json.loads(fd.read().strip()).get("libVersion", None)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 1497: illegal multibyte sequence
fixed,请更新下包
def _get_sdk_version(self): # read from project.config.json if self.project_path and os.path.isfile( os.path.join(self.project_path, "project.config.json") ): with open(os.path.join(self.project_path, "project.config.json"), "r") as fd: self.sdk_version = json.loads(fd.read().strip()).get("libVersion", None) 点击报错的的位置,将wx_minium.py文件的该行代码 with open(os.path.join(self.project_path, "project.config.json"), "r") as fd:的读取模式修改为"rb"试一下。
遇到同样的问题,请问解决了吗