getting ValueError: too many values to unpack when plotting rasterfairy
mgiraldo opened this issue · comments
it's throwing an error in this line:
10 for img, grid_pos in tqdm(zip(images, grid_assignment)):
---> 11 idx_x, idx_y = grid_pos
12 x, y = tile_width * idx_x, tile_height * idx_y
13 tile = Image.open(img)
ValueError: too many values to unpack
the iterator in for img, grid_pos in tqdm(zip(images, grid_assignment)):
destructures grid_pos
as idx_x, idx_y
but by inspecting grid_assignment
it has two elements, the first being the 1k images and the second being the dimensions of the grid. i got it to work by changing that line to:
for img, grid_pos in tqdm(zip(images, grid_assignment[0])):