Python错误集锦

  1. Python错误集锦:sqlite3建表时提示:sqlite3.OperationalError: table table_juzicode already exists
  2. Python错误集锦:AttributeError: partially initialized module ‘numpy’ has no attribute ‘ones’ (most likely due to a circular import)
  3. Python错误集锦:sqlite3插入记录提示:IntegrityError: UNIQUE constraint failed: table_juzicode._id
  4. Python错误集锦:join()函数提示TypeError: sequence item 0: expected str instance, int found
  5. Python错误集锦:pip安装模块时提示“UnicodeDecodeError: ‘utf-8’ codec can’t decode
  6. Python错误集锦:TypeError: ‘tuple’ object doesn’t support item deletion
  7. Python错误集锦:升级pip时报错OSError: [WinError 17],再使用pip时提示ModuleNotFoundError: No module named ‘pip’
  8. Python错误集锦:multiprocessing无法启动多个子进程
  9. Python错误集锦:ValueError: Single argument to subplot must be a three-digit integer, not 3411
  10. Python错误集锦:pandas读取excel提示ImportError: Missing optional dependency ‘xlrd’.
  11. Python错误集锦:在pandas中用to_excel()写xlsx文件提示:ModuleNotFoundError: No module named ‘openpyxl’
  12. Python错误集锦:pyplot.hist()绘制直方图时提示:ValueError: x must have 2 or fewer dimensions
  13. Python错误集锦: 导入numpy模块时报错:fails to pass a sanity check due to a bug in the windows runtime
  14. Python错误集锦:在pandas中用to_excel()写xls文件提示:ModuleNotFoundError: No module named ‘xlwt’
  15. Python错误集锦:对numpy数组进行变形操作时,提示ValueError: cannot reshape array of size 24 into shape (3,5)
  16. Python错误集锦:TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’
  17. Python错误集锦:NameError: name ‘a’ is not defined
  18. Python错误集锦:pandas绘制多个子图时报错:AttributeError: ‘list’ object has no attribute ‘get_figure’
  19. Python错误集锦:开启线程时提示TypeError: func() argument after * must be an iterable, not int
  20. Python错误集锦:with方法打开文件提示:ValueError: I/O operation on closed file.
  21. Python错误集锦:修改字符串时提示TypeError: ‘str’ object does not support item assignment
  22. Python错误集锦:IDLE运行多进程程序时,主进程正常运行、子进程不能正常运行
  23. Python错误集锦:TypeError: ‘set’ object doesn’t support item deletion
  24. Python错误集锦:set计算并集时TypeError: unsupported operand type(s) for +: ‘set’ and ‘set’
  25. Python错误集锦:使用list.index()提示ValueError: 20 is not in list
  26. Python错误集锦:matplotlib imshow()方法显示图像提示:TypeError: Invalid shape (100, 100, 5) for image data
  27. Python错误集锦:除法运算时提示ZeroDivisionError: division by zero
  28. Python错误集锦:multiprocessing没有真正启动多进程,子进程pid等于主进程
  29. Python错误集锦:venv安装虚拟环境后再更改路径报错:Fatal error in launcher: Unable to create process using
  30. Python错误集锦:调用列表的元素时提示IndexError: list assignment index out of range
  31. Python错误集锦:读写文件时提示UnsupportedOperation: not readable
  32. Python错误集锦:字符串转换成浮点数据时报错:ValueError: could not convert string to float: ‘5.ab’
  33. Python错误集锦:字符串到10进制转换时提示:ValueError: invalid literal for int() with base 10: ‘1a’
  34. Python错误集锦:使用%s格式化tuple类型的字符串:TypeError: not all arguments converted during string formatting
  35. Python错误集锦:IndentationError: unindent does not match any outer indentation level
  36. Python错误集锦:list类型的数据作为字典的key提示TypeError: unhashable type: ‘list’
  37. Python错误集锦:打开文件路径提示参数无效,OSError: [Errno 22] Invalid argument: ‘D:\juzicode\桔子code\readme.txt’
  38. Python错误集锦:使用字符串join()方法时提示TypeError: join() takes exactly one argument (3 given)
  39. Python错误集锦:格式化字符串IndexError: Replacement index 5 out of range for positional args tuple
  40. Python错误集锦:list、dict类型的数据作为set的元素报TypeError: unhashable type: ‘list’,TypeError: unhashable type: ‘dict’
  41. Python错误集锦:TypeError: ‘tuple’ object does not support item assignment
  42. Python错误集锦:python: can’t open file ‘hello’: [Errno 2] No such file or directory
  43. Python错误集锦:IndentationError: unexpected indent
  44. Python错误集锦:File “hello.py”, line 3 SyntaxError: Non-UTF-8 code starting with ‘\xbd’ in file hello.py on line 3, but no encoding declared
  45. Python错误集锦:’pip’ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
  46. Python错误集锦:”‘python’ 不是内部或外部命令,也不是可运行的程序 或批处理文件。”
  47. Python错误集锦:定义字符串提示SyntaxError: EOL while scanning string literal
  48. Python错误集锦:UnboundLocalError: local variable ‘x’ referenced before assignment
  49. Python错误集锦:字符串的大写转换函数AttributeError: ‘str’ object has no attribute ‘uper’
  50. Python错误集锦:定义变量时提示:SyntaxError: invalid syntax
  51. Python错误集锦:调用类方法时提示TypeError: prt() takes 0 positional arguments but 1 was given
  52. Python错误集锦:SyntaxError: invalid character in identifier