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"试一下。
minium更新到1.2.0的时候获取系统信息的时候报错是怎么回事呢?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
2021-10-12Pycharm
官方提供的小程序自动化文档中配置minium包安装成功后,引用包时提示找不到?[图片]
2021-09-13