1 AttributeError: 'builtin_function_or_method' object has no attribute 'execute'

检查 cursor没有获取到应用conn.cursor()

2 使用读取、打开、添加、删除xml文档 保存文档时文档总空

分功能测试代码后发现是 close方法没有写小括号

#write back to the library file
lib=open(r"E:\pythonscript\ch15\library.xml","w")
lib.write(myDoc.toprettyxml(" "))
lib.close()

3 python语句使用的缩进方式不一致时如:一行使用:tab 键、一行使用:空格 ,则提示出错

4 自己编写的程序文件命名与引用的模块或库重名 报错

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-01
  • 2021-08-29
  • 2021-12-23
猜你喜欢
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-29
  • 2022-12-23
相关资源
相似解决方案