python错误:AttributeError: ‘module‘ object has no attribute ‘xxxxx‘,10种总结(成功解决)

在使用python过程中是不是经常遇到这个问题:AttributeError: 'module' object has no attribute 'xxxxx'。我最近在使用python过程中也遇到了向这样的问题,在这里我就这个问题总结最常出现的10种以下几种情况:

这里写目录标题

  • 情况一:AttributeError: module 'cv2' has no attribute 'CV_HAAR_SCALE_IMAGE'
    • 问题
    • 问题分析
    • 解决办法
  • 情况二:AttributeError: 'module' object has no attribute 'text_format'
    • 问题
    • 问题分析
    • 解决办法
  • 情况三:AttributeError: 'module' object has no attribute 'dumps'
    • 问题
    • 问题分析
    • 原因
  • 情况四:AttributeError: 'module' object has no attribute 'urlopen'
    • 问题
    • 问题分析
    • 解决方法
  • 情况五:AttributeError: 'module' object has no attribute 'Serial'
    • 问题
    • 问题分析
    • 问题解决
  • 情况六:AttributeError: 'module' object has no attribute 'App'
    • 问题
    • 问题分析
    • 解决方法
  • 情况七:AttributeError: 'module' object has no attribute 'getpass'
    • 问题
    • 问题分析
    • 解决办法
  • 情况八:service_identity 模块 AttributeError: 'module' object has no attribute 'Any'
    • 问题
    • 问题分析
    • 解决办法
  • 情况九:AttributeError: 'module' object has no attribute 'Workbook'
    • 问题
    • 问题分析
    • 问题解决
  • 情况十:AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'
    • 问题
    • 问题分析
    • 问题解决

情况一:AttributeError: module ‘cv2’ has no attribute ‘CV_HAAR_SCALE_IMAGE’

问题

OpenCV – python

>>> import cv2
>>> help(cv2

你可能感兴趣的:(python,python,bug,错误总结)