ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 30 forks source link

py3 Figure export bugs #350

Closed will-moore closed 4 years ago

will-moore commented 4 years ago

With a scalebar, we get this with TIFF export:

  File "./script", line 1777, in add_panels_to_page
    self.draw_scalebar(panel, pil_img.size[0], page)
  File "./script", line 1302, in draw_scalebar
    self.draw_line(lx, ly, lx_end, ly, 3, (red, green, blue))
  File "./script", line 2036, in draw_line
    for l in range(width):
TypeError: 'float' object cannot be interpreted as an integer

If the figure name contains Unicode characters, we get:

File "./script", line 1790, in create_figure
    name = self.get_figure_file_name()
  File "./script", line 889, in get_figure_file_name
    while(os.path.exists(full_name)):
  File "/usr/lib64/python3.6/genericpath.py", line 19, in exists
    os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character '\xb5' in position 5: ordinal not in range(128)
will-moore commented 4 years ago

Issues have been fixed now.