Avoid:
Traceback (most recent call last):
…
File "/.../gallery.py", line 610, in page
self._page(path=file_path, stream=stream)
File "/.../gallery.py", line 719, in _page
gallery_page = '{}/?pp={:d}'.format(gallery, page + 1)
ValueError: Unknown format code 'd' for object of type 'float'
images = list(self._images(gallery))
images_per_page = self._rows * self._columns
i = images.index(path)
- page = i / images_per_page
+ page = i // images_per_page
gallery_page = '{}/?pp={:d}'.format(gallery, page + 1)
prev_page = self._image_page(images[i - 1])
next_page = self._image_page(images[(i + 1) % len(images)])