Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683850 - media-gfx/mcomix-1.2.1 with dev-python/pillow-6 - AttributeError: 'module' object has no attribute 'VERSION'
Summary: media-gfx/mcomix-1.2.1 with dev-python/pillow-6 - AttributeError: 'module' ob...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL: https://sourceforge.net/p/mcomix/git/...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-04-19 13:36 UTC by زياد بن عبدالعزيز الباتلي
Modified: 2020-03-05 12:06 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Replace PIL.Image.VERSION with PIL.__version__ (0201-Replace-PIL.Image.VERSION-with-PIL.__version__.patch,1.47 KB, patch)
2019-04-19 13:36 UTC, زياد بن عبدالعزيز الباتلي
Details | Diff
Fixes to run mcomix with Pillow 6 (pillow-6.patch,1.49 KB, patch)
2019-04-21 23:58 UTC, Adam Jones
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description زياد بن عبدالعزيز الباتلي 2019-04-19 13:36:15 UTC
Created attachment 573450 [details, diff]
Replace PIL.Image.VERSION with PIL.__version__

After upgrading to dev-python/pillow-6.0.0::gentoo mcomix stopped working with the error:
----8<----
Traceback (most recent call last):                                                                                                                     
  File "/usr/lib/python-exec/python2.7/mcomix", line 11, in <module>                                                                                    
    load_entry_point('mcomix==1.2.1', 'console_scripts', 'mcomix')()                                                                 
  File "/usr/lib64/python2.7/site-packages/mcomix/run.py", line 206, in run                                                         
    assert PIL.Image.VERSION >= '1.1.5'                                                                                                
AttributeError: 'module' object has no attribute 'VERSION'
---->8----

Upstream fixed this recently with 486f02eef164df451a72598ce5989a1b37b49c60 (titled: Replace PIL.Image.VERSION with PIL.__version__)

The patch applies on top of media-gfx/mcomix-1.2.1 (as present in the Gentoo portage tree) cleanly.

The patch is attached here.

Thank you sooooo much for your hard work.
Comment 1 زياد بن عبدالعزيز الباتلي 2019-04-19 15:56:09 UTC
Please note that the patch fixes the problem *without* breaking older version of dev-python/pillow (<dev-python/pillow-6).  So users who still use older version of dev-python/pillow will *not* get affected with this patch.

Thanks.
Comment 2 Adam Jones 2019-04-21 23:58:03 UTC
Created attachment 573762 [details, diff]
Fixes to run mcomix with Pillow 6

I found that I also needed to set USE_PIL=True to avoid getting an "assert name not in supported_formats" error.

Upstream appears to have some more comprehensive changes, but this patch gets things working for the time being.
Comment 3 François Bissey 2019-04-24 21:58:03 UTC
Adam's patch works for me.
Comment 4 Ștefan Talpalaru 2019-05-10 19:58:09 UTC
Fixed in media-gfx/mcomix-1.2.1_p20190406 from my overlay: https://github.com/stefantalpalaru/gentoo-overlay
Comment 5 Adrien Tougas 2019-08-13 21:06:17 UTC
(In reply to زياد بن عبدالعزيز الباتلي from comment #0)
> Upstream fixed this recently with 486f02eef164df451a72598ce5989a1b37b49c60
> (titled: Replace PIL.Image.VERSION with PIL.__version__)
> 
> The patch applies on top of media-gfx/mcomix-1.2.1 (as present in the Gentoo
> portage tree) cleanly.
> 
> The patch is attached here.
> 
> Thank you sooooo much for your hard work.

This patch worked for me. 
I have not noticed any errors like those described by Adam Jones from comment #2 as such I haven't tried his patch.
Comment 6 Andreas Sturmlechner gentoo-dev 2020-03-01 21:41:57 UTC
It seems this package is broken in stable - would it make sense to remove 1.2.1 then and drop it back to ~arch, or is 1.3.0_pre20200206 already eligible for early stabilisation?
Comment 7 Bernard Cafarelli gentoo-dev 2020-03-05 12:06:53 UTC
Thanks, I forgot to update this bug when I bumped mcomix.

Considering current stable is broken and I did not get bug reports so far on 1.3.0_pre20200206, I think we should go with early stabilization (and also get rid of pygtk dependency).

I filled bug #711584 for stabling, marking this one as fixed for the issue itself with version bump 1.3.0_pre20200206