YuvalBahat / Explorable-Super-Resolution

Apache License 2.0
62 stars 8 forks source link

Error when trying to start the GUI: "TypeError: pad() missing 1 required positional argument: 'mode'" #5

Closed n00mkrad closed 4 years ago

n00mkrad commented 4 years ago

I get this error when trying to launch the GUI on Windows.

Python, PyTorch and CUDA are all installed and up to date.

D:\AI\Explorable-Super-Resolution>python GUI.py -opt ./options/test/GUI_SR.json D:\Software\py37\lib\site-packages\sklearn\feature_extraction\text.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working from collections import Mapping, defaultdict Using GPU #0 libpng warning: sBIT: invalid Adding toolbar Load & Save Traceback (most recent call last): File "GUI.py", line 2545, in window = MainWindow() File "GUI.py", line 1319, in init self.setupUi() File "D:\AI\Explorable-Super-Resolution\MainWindow.py", line 309, in setupUi layout_cols=4) File "D:\AI\Explorable-Super-Resolution\MainWindow.py", line 48, in Define_Grid_layout cur_row,cur_col = self.Greedily_Find_Location(occupancy_map=occupancy_map, button_size=button_sizes[button_num]) File "D:\AI\Explorable-Super-Resolution\MainWindow.py", line 24, in Greedily_Find_Location occupancy_map = np.pad(np.logical_not(occupancy_map),((0,button_size[0]-1),(0,button_size[1]-1))) TypeError: pad() missing 1 required positional argument: 'mode'

YuvalBahat commented 4 years ago

Hi, I added the default mode value "constant" to all np.pad calls.