Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load module "appmenu-gtk-module" #87

Closed
JackMechem opened this issue Aug 3, 2021 · 1 comment
Closed

Failed to load module "appmenu-gtk-module" #87

JackMechem opened this issue Aug 3, 2021 · 1 comment

Comments

@JackMechem
Copy link

Hello

I am running Arch Linux and I am running into this error

The support for Qt4  was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
  from matplotlib.backends.qt_compat import QtGui
[win_size] = 512
[image_file] = test_imgs/mortar_pestle.jpg
[gpu] = 0
[cpu_mode] = True
[color_prototxt] = ./models/reference_model/deploy_nodist.prototxt
[color_caffemodel] = ./models/reference_model/model.caffemodel
[dist_prototxt] = ./models/reference_model/deploy_nopred.prototxt
[dist_caffemodel] = ./models/reference_model/model.caffemodel
[color_model] = ./models/pytorch/caffemodel.pth
[backend] = pytorch
[pytorch_maskcent] = False
[load_size] = 256
ColorizeImageTorch instantiated
path = ./models/pytorch/caffemodel.pth
Model set! dist mode?  False
ColorizeImageTorch instantiated
path = ./models/pytorch/caffemodel.pth
Model set! dist mode?  True

**ERROR STARTS HERE**

Gtk-Message: 10:54:48.068: Failed to load module "appmenu-gtk-module"
b'test_imgs/mortar_pestle.jpg'
Traceback (most recent call last):
  File "/home/jack/interactive-deep-colorization/ideepcolor.py", line 78, in <module>
    window = gui_design.GUIDesign(color_model=colorModel, dist_model=distModel,
  File "/home/jack/Cool/interactive-deep-colorization/ui/gui_design.py", line 112, in __init__
    self.drawWidget.init_result(img_file)
  File "/home/jack/interactive-deep-colorization/ui/gui_draw.py", line 48, in init_result
    self.read_image(image_file.encode('utf-8'))  # read an image
  File "/home/jack/interactive-deep-colorization/ui/gui_draw.py", line 73, in read_image
    im_bgr = cv2.imread(image_file)
TypeError: Can't convert object of type 'bytes' to 'str' for 'filename' 

I have installed all of the listed dependencies. I am using pytorch because I could not get Caffe installed on my system (pytorch was easier). I assume the error is handling with the UI but I am not sure what it is caused by.

@Benitoite
Copy link

img_path = unicode(QFileDialog.getOpenFileName(self, 'load an input image'))

The unicode and str types are no longer interchangeable in python3 as they were previously.

@JackMechem JackMechem closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants