adrienverge / PhotoCollage

Graphical tool to make photo collage posters
GNU General Public License v2.0
432 stars 73 forks source link

Multiple errors trying to run PhotoCollage #103

Open okopnik opened 7 months ago

okopnik commented 7 months ago

Hi -

Ubuntu 14.04.5 Python 3.5.2

Trying to run the program, and getting a number of errors. The first one, a non-fatal warning about the PiXBuf version, was a relatively easy fix - I added 'import gi' and "gi.require_version('GdkPixbuf', '2.0')" to 'artwork.py' - but there are two more that I'm too out of practice with Python to figure out. The first one happens when I click "Add Images":

TypeError: Couldn't find foreign struct converter for 'cairo.Context'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 285, in choose_images
    dialog = PreviewFileChooserDialog(title=_("Choose images"),
  File "/usr/lib/python3.5/gettext.py", line 529, in gettext
    return dgettext(_current_domain, message)
  File "/usr/lib/python3.5/gettext.py", line 492, in dgettext
    t = translation(domain, _localedirs.get(domain, None),
SystemError: <built-in method get of dict object at 0x7f38730d6e88> returned a result with an error set
TypeError: Couldn't find foreign struct converter for 'cairo.Context'

Clicking it a couple of times gets me past that one, but once I select the images to import, another one comes up:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 326, in on_update
    self.img_preview.set_collage(img, collage)
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 492, in set_collage
    self.image = pil_image_to_cairo_surface(image)
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 47, in pil_image_to_cairo_surface
    buf = BytesIO()
SystemError: <class '_io.BytesIO'> returned a result with an error set
TypeError: Couldn't find foreign struct converter for 'cairo.Context'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 326, in on_update
    self.img_preview.set_collage(img, collage)
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 492, in set_collage
    self.image = pil_image_to_cairo_surface(image)
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 47, in pil_image_to_cairo_surface
    buf = BytesIO()
SystemError: <class '_io.BytesIO'> returned a result with an error set
TypeError: Couldn't find foreign struct converter for 'cairo.Context'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 326, in on_update
    self.img_preview.set_collage(img, collage)
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 492, in set_collage
    self.image = pil_image_to_cairo_surface(image)
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 47, in pil_image_to_cairo_surface
    buf = BytesIO()
SystemError: <class '_io.BytesIO'> returned a result with an error set
TypeError: Couldn't find foreign struct converter for 'cairo.Context'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 326, in on_update
    self.img_preview.set_collage(img, collage)
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 492, in set_collage
    self.image = pil_image_to_cairo_surface(image)
  File "/usr/local/lib/python3.5/dist-packages/photocollage/gtkgui.py", line 47, in pil_image_to_cairo_surface
    buf = BytesIO()
SystemError: <class '_io.BytesIO'> returned a result with an error set

I'd appreciate any help you folks can offer.