AttributeError: module 'wx' has no attribute 'AboutDialogInfo' - python-3.x

I use wxPython 4.0.0b1 GTK2 (Phoenix) on Ubuntu 16.04 with python3.5. I am getting the following error:
AttributeError: module 'wx' has no attribute 'AboutDialogInfo'.
The code is pretty straightforward with no complexity.

Use:
aboutInfo = wx.adv.AboutDialogInfo()
https://wxpython.org/Phoenix/docs/html/wx.adv.AboutDialogInfo.html#wx.adv.AboutDialogInfo

Related

AttributeError: module 'flax' has no attribute 'optim'

My code is as follows:
!pip install flax
init_params = TransporterNets().init(key, init_img, init_text, init_pix)['params']
print(f'Model parameters: {n_params(init_params):,}')
optim = flax.optim.Adam(lr=1e-4).create(init_params)
However it shows the following error:
AttributeError: module 'flax' has no attribute 'optim'
Even though I have seen documentation of optim attribute in flax module. How to fix it?
You can temporarily solve the issue by downgrading flax version from 0.6.0 to 0.5.1 at the moment.
pip install flax==0.5.1

module 'torch' has no attribute 'linalg'

I am getting this error AttributeError: module 'torch' has no attribute 'linalg' when updating the parameters using optimizer.step(model.closure).
I am using Pytorch version 1.4.0.
linalg was introduced to pytorch only on a later version (1.7.0). Update pytorch and try again.

OpenCV2 createBackgroundSubtractorMOG Attribute not found

I am using cv2 version 4.0.0 and python version 3.7.2.
I am trying to subtract Background using this method cv2.createBackgroundSubtractorMOG2() and its working well.
But when I use cv2.createBackgroundSubtractorMOG() its not working its showing me
AttributeError: module 'cv2.cv2' has no attribute
'createBackgroundSubtractorMOG '.
I also tried cv2.BackgroundSubtractorMOG() but i got same error
AttributeError: module 'cv2.cv2' has no attribute
'BackgroundSubtractorMOG'.
and another subtraction method cv2.createBackgroundSubtractorGMG() also not working.
I also refer other stackoverflow answers but I didn't get solution.
MOG2 containts in main opencv repository. MOG and GMG are from opencv_contrib: https://github.com/opencv/opencv_contrib/tree/master/modules/bgsegm
there are two subtraction packages in opencv. BackgroundSubtractorMOG() it's at cv2.bgsegm.BackgroundSubtractorMOG(),to use you must install opencv-contrib-python

AttributeError: module 'enum' has no attribute 'IntFlag'

While installing any modules on Python in windows 10 I am getting this error. I tried to install numpy buI got this error.
This is the screeshot of the error o got

AttributeError: 'module' object has no attribute 'sift'

I want to use sift() in python &openCV
here is my environment:
python:2.7.6
os:ubuntu 14.04
opencv:2.4.9
After several hours hard-work, now i seem to successfully install opencv,because i can do as below:
import cv2
print cv2.version ---- 2.4.9
now my problem is that when i want to call cv2.sift(),it says AttributeError: 'module' object has no attribute 'sift'
If i download opencv_contrib from github and use cmake -DOPENCV_EXTRA_MODULES_PATH=/modules , the compiling will fail , it says:
Module opencv_xfeatures2d disabled because opencv_shape dependency can't be resolved!
someone else even says the opencv_contrib can only work with opencv3
then how can i solve this problem? I need your help~

Resources