当前位置:   article > 正文

安装weditor时报UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xad in position 645_unicodedecodeerror: 'gbk' codec can't decode byte

unicodedecodeerror: 'gbk' codec can't decode byte 0xad in position 645: ille
  1. PS D:\WorkSpace\Py> pip install weditor
  2. Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
  3. Collecting weditor
  4. Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a1/c6/ec92e8d4a95f4e901e3b6764e1b716ac85dd9892d36d5f40fef6063cdbd6/weditor-0.7.2.tar.gz (2.2 MB)
  5. Installing build dependencies ... done
  6. Getting requirements to build wheel ... done
  7. Installing backend dependencies ... done
  8. Preparing metadata (pyproject.toml) ... error
  9. error: subprocess-exited-with-error
  10. × Preparing metadata (pyproject.toml) did not run successfully.
  11. exit code: 1
  12. ╰─> [28 lines of output]
  13. Error parsing
  14. Traceback (most recent call last):
  15. File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\core.py", line 105, in pbr
  16. attrs = util.cfg_to_args(path, dist.script_args)
  17. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  18. File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\util.py", line 272, in cfg_to_args
  19. pbr.hooks.setup_hook(config)
  20. File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\hooks\__init__.py", line 25, in setup_hook
  21. metadata_config.run()
  22. File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\hooks\base.py", line 27, in run
  23. self.hook()
  24. File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\hooks\metadata.py", line 25, in hook
  25. self.config['version'] = packaging.get_version(
  26. ^^^^^^^^^^^^^^^^^^^^^^
  27. File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\packaging.py", line 854, in get_version
  28. version = _get_version_from_pkg_metadata(package_name)
  29. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  30. File "C:\Users\86139\AppData\Local\Temp\pip-build-env-qjw2ltgj\normal\Lib\site-packages\pbr\packaging.py", line 822, in _get_version_from_pkg_metadata
  31. pkg_metadata = email.message_from_file(pkg_metadata_file)
  32. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  33. File "D:\language\Python\Lib\email\__init__.py", line 54, in message_from_file
  34. return Parser(*args, **kws).parse(fp)
  35. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  36. File "D:\language\Python\Lib\email\parser.py", line 53, in parse
  37. data = fp.read(8192)
  38. ^^^^^^^^^^^^^
  39. UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 645: illegal multibyte sequence
  40. error in setup command: Error parsing C:\Users\86139\AppData\Local\Temp\pip-install-ik95dwee\weditor_89565445f80d4cba9826a4161c601367\setup.cfg: UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 645: illegal multibyte sequence
  41. [end of output]
  42. note: This error originates from a subprocess, and is likely not a problem with pip.
  43. error: metadata-generation-failed
  44. × Encountered error while generating package metadata.
  45. ╰─> See above for output.
  46. note: This is an issue with the package mentioned above, not pip.
  47. hint: See above for details.

解决方法:

  1. git clone https://github.com/openatx/weditor
  2. pip3 install -e weditor

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/一键难忘520/article/detail/751898
推荐阅读
相关标签
  

闽ICP备14008679号