python 2.7 问题

 data_file = open("F:\\MyPro\\data.yaml", "r", encoding='utf-8')

  运行的时候报错:TypeError: 'encoding' is an invalid keyword argument for this function
如何解决:
import io
data_file = io.open("F:\\MyPro\\data.yaml", "r", encoding='utf-8')

  

 

相关文章:

  • 2021-09-26
  • 2022-12-23
  • 2021-12-02
  • 2021-06-16
  • 2021-11-19
  • 2022-03-07
  • 2021-06-28
  • 2022-12-23
猜你喜欢
  • 2021-08-16
  • 2022-12-23
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案