zoukankan      html  css  js  c++  java
  • python错误大全

        1、NameError:name 'Ture' is not defined
            这个是名字没有定义,也可能写错了
            while True:
        2、IndentationError: unindent does not match any outer indentation level
            这个是因为没有在行首输入,是因为有空格。
        3、OSError: [Errno 22] Invalid argument: 'd:x01.txt'
            主要原因是读取文件内容时出现错误,主要是由于文件路径出错。
            代码为:with open('d:1.txt') as f:
                              print(f.read())
            解决方法:with open('d:/1.txt') as f:  把路径变成/就可以解决问题.
    
  • 相关阅读:
    初始化项目结构
    Django基础2
    Django基础
    Linux(9~)
    Linux(8~)
    redis案例
    Jedis连接池
    Jedis入门
    redis持久化
    redis命令操作
  • 原文地址:https://www.cnblogs.com/wang50902/p/11661881.html
Copyright © 2011-2022 走看看