junyanz / interactive-deep-colorization

Deep learning software for colorizing black and white images with a few clicks.
https://richzhang.github.io/ideepcolor/
MIT License
2.69k stars 447 forks source link

error: "name 'unicode' is not defined" #85

Closed semel1 closed 2 years ago

semel1 commented 3 years ago

Finally managed to launch GUI (Windows 10) after replacement in the "gui_draw.py": self.read_image(image_file.encode('utf-8')) # read an image to self.read_image(image_file) # read an image Default image (mortar_pestle.jpg) works fine. However attempt to load image using GUI "Load" button throws an error:

Traceback (most recent call last): File "F:\ideepcolor\ui\gui_design.py", line 151, in load self.drawWidget.load_image() File "F:\ideepcolor\ui\gui_draw.py", line 220, in load_image img_path = unicode(QFileDialog.getOpenFileName(self, 'load an input image')) NameError: name 'unicode' is not defined

Blastd commented 2 years ago

change 'unicode' to str https://stackoverflow.com/questions/19877306/nameerror-global-name-unicode-is-not-defined-in-python-3