Package Details: phatch

Git Clone URL: (read-only)
Package Base: phatch
Description: A simple to use cross-platform GUI Photo Batch Processor.
Upstream URL:
Licenses: GPL
Provides: phatch=
Submitter: Mymaud
Maintainer: blubbblubb
Last Packager: blubbblubb
Votes: 104
Popularity: 0.429304
First Submitted: 2007-10-07 08:52
Last Updated: 2018-02-19 18:33

Latest Comments

WhyNotHugo commented on 2018-02-17 18:31

Description should probably be "A simple to use cross-platform GUI Photo Batch Processor."

blubbblubb commented on 2016-11-09 16:52

removed the wx.InitAllImageHandlers() and added a tuple conversion so it doesnt crash anymore

use this PKGBUILD:

Spheerys commented on 2016-11-09 14:27

I have the same problem as dysw : I only have the logo, not the GUI !

blubbblubb commented on 2016-06-01 11:05

still works for me, check my previous comment, maybe thats your problem

dysw commented on 2016-06-01 11:02

It builds fine. But once running, only the initial logo is shown, the program itself never runs and you have to kill the process to remove the logo from your screen.

trulex commented on 2016-04-21 09:20

/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/ GtkWarning: gtk_disable_setlocale() must be called before gtk_init()
return _core_.PyApp__BootstrapApp(*args, **kwargs)
/usr/lib/python2.7/site-packages/phatch/pyWx/ wxPyDeprecationWarning: Call to deprecated item.
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/", line 16762, in <lambda>
lambda event: event.callable(*event.args, ** )
File "/usr/lib/python2.7/site-packages/phatch/pyWx/", line 1221, in show_frame
frame = Frame(self.filename, None, -1, ct.TITLE)
File "/usr/lib/python2.7/site-packages/phatch/pyWx/", line 327, in __init__
frame.Frame.__init__(self, *args, **keyw)
File "/usr/lib/python2.7/site-packages/phatch/pyWx/wxGlade/", line 141, in __init__
File "/usr/lib/python2.7/site-packages/phatch/pyWx/wxGlade/", line 26, in __init__
set_dirty = parent.set_dirty,
File "/usr/lib/python2.7/site-packages/phatch/lib/pyWx/", line 96, in __init__
File "/usr/lib/python2.7/site-packages/phatch/lib/pyWx/", line 111, in CreateImageList
self._AddFormToImageList(form, icon_size, icon_disabled)
File "/usr/lib/python2.7/site-packages/phatch/lib/pyWx/", line 120, in _AddFormToImageList
wx_image = pil_wxImage(wxImage_pil(wx_image).resize(icon_size,\
File "/usr/lib/python2.7/site-packages/phatch/lib/pyWx/", line 46, in wxImage_pil
File "/usr/lib/python2.7/site-packages/PIL/", line 750, in fromstring
"Please call frombytes() instead.")
Exception: fromstring() has been removed. Please call frombytes() instead.

blubbblubb commented on 2016-02-03 18:27

it works if the python2-pillow version is <=3

if you want to use the latest python2-pillow version use this PKBUILD:

just added a couple of sed commands to replace the deprecated functions

sender commented on 2015-11-20 16:46

@anish I have the same problem that @xananax describes. The version by @TiborB works. Maybe merge/update? Thanks.

xananax commented on 2015-11-15 18:26

When I try running phatch I get:

08:22:45 PM: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1008,wx containers,compatible with 2.8),
and wxPython used 3.0 (wchar_t,compiler with C++ ABI 1002,wx containers,compatible with 2.8).

Exception: fromstring() has been removed. Please call frombytes() instead.

Full log at

TiborB commented on 2015-06-03 11:25


I gave up with your branches. Instead I created new one based on "vanilla" phatch code:

It was kind of tested :) To run it no installation is needed, just unpack the zip (downloading the zip is easiest way to get the package) and run script (also with double click from file manager).

anish commented on 2015-05-27 20:59


The python2 repo is now fully working :

As I mentioned before, the python3 repo is still wip, feel free to send any pull requests. You can send me an email the address listed in the PKGBUILD or the repo.

TiborB commented on 2015-05-27 20:25


how can we communicate apart from here?

I noticed there is a new python3 repository - are you going to work on it, or I can look at it?

When I tried to run it, if failed complaining it is not python2.x. :)

TiborB commented on 2015-05-26 20:34

No hurry, I am done for today anyway...

It would be nice if you also test it on your PC with 'pythonX' and see it works (or doesnt work) as expected

I mean only unpack the tarball and uninstall system-wide package just to avoid interferences and so on - if I may suggest...

anish commented on 2015-05-26 20:26

WIP :) I'm also at work so doing it as I get time, it'll be fixed once I'm home

TiborB commented on 2015-05-26 20:22

Why did you stop working on it? Obviously you are capable to work on it.

I expected the same behaviour as when running arch-linux's phatch.

Oh, I just looked at PKGBUILD, you are doing some heavy 'sed'ing... Why dont you implement your changes to the repository?

python3 is more perspective. So it would be reasonable to work on this...

This is really not straightforward...

anish commented on 2015-05-26 20:10

There's also a python3 branch that I committed (the migration is not complete yet, no guarantees) that you can try if you don't want python2.7

anish commented on 2015-05-26 20:09

The code I uploaded is from the release tarball ( , not the upstream repo.

TiborB commented on 2015-05-26 19:31

What code did you post on github? On there is no file....

TiborB commented on 2015-05-26 19:28

You are fast.

I download zip and tried to run it:

python2.7 ./
Traceback (most recent call last):
File "./", line 29, in <module>
from core import config
File "/home/tibor/devel/phatch-fork/phatch-master/phatch/core/", line 29, in <module>
from lib import desktop
ImportError: No module named lib

And I just spent 10 minutes of estimated 30 minutes of work :( There is no library "lib" in python:( Going to google for it...

anish commented on 2015-05-26 19:07

I just made a new repo at Adding the code in just about a min.

TiborB commented on 2015-05-26 18:55

I dont think it is half-hour work (for me). I know python, but I am not much familiar with PIL/pillow stuff. Also there are some critical bugs reported for phatch, so as I see it there is some "technological debt". So again - no half hour job

Anyway, I will look at it and see I am able to do something with it. No sense to set up a fork and everything just to find out we are not able to do anything with it. Or motivated enough..

juego commented on 2015-05-26 18:12

@TiborB: Don't know. Have no idea how much just a patch could solve the problems we have right now. As I read the comments, there seems to be quite some work to do to keep this app updated. Just patching it might just keep it alive for a couple of months. But then... Don't know. Thinking out loud. Of course, a full fork is a big deal. Maybe too much at this time.

TiborB commented on 2015-05-26 17:50

Are we talking about full-fledged fork? Own homepage, repository, bug tracking and so on? If it is the case, then it would take more then one person, of course :)

juego commented on 2015-05-26 17:38

Don't know if I can be of any help. But I would love to have this package running again. Have so much macros with it that it hurts it's not running anymore. Do you plan to host the code somewhere to encourage collaboration?

TiborB commented on 2015-05-19 20:10

Few days ago I tried to contact developers - no response. I was even considering participation in the project. At least I could try :)

Luckily it still works on debian, so for some time I can use my other box for processing my photos.

anish commented on 2015-05-19 19:57

@TiborB sadly yes, there has been no upstream update in a while, as a consequence no update here either. I haven't had to recompile this in a while. I'll take a look, but the actual code is way behind upstream python packages at this point.

If you find a fix, I'd be happy to add it to the PKBUILD and give you attribution.

TiborB commented on 2015-05-19 19:52

Hi, I am getting error:

File "/usr/lib/python2.7/site-packages/phatch/core/", line 780, in apply_actions_to_photo
AttributeError: 'NoneType' object has no attribute 'close'

'python2-pillow is in version 2.4.0-1.

It is pity that this application is abandoned...

albertmatyi commented on 2014-09-09 15:59

Edit PKGBBULD and modify 'python2-pillow' to 'python2-pillow=2.4.0', that should fix the

AttributeError: 'NoneType' object has no attribute 'mode'


theo974 commented on 2014-08-25 15:18

flag out of date is an error

theo974 commented on 2014-08-25 15:15

@tesfabpel To solve the problem you should downgrade python2-pillow to python-pillow-2.4.0-1. look at

theo974 commented on 2014-08-25 14:53

@tesfabpel same error for me

tesfabpel commented on 2014-08-06 11:18

It gives me this error when executing an action list:

Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/phatch/pyWx/", line 701, in on_menu_tools_execute
File "/usr/lib/python2.7/site-packages/phatch/pyWx/", line 300, in _execute
update=self._send_update_event, **keyw)
File "/usr/lib/python2.7/site-packages/phatch/core/", line 729, in apply_actions_to_photos
is_done, image_index, repeat)
File "/usr/lib/python2.7/site-packages/phatch/core/", line 780, in apply_actions_to_photo
AttributeError: 'NoneType' object has no attribute 'close'

Am I the only one?

kinu commented on 2013-10-14 18:32

@mariusn and @anish, Thank you both. Now is working ok! thanks again!

mariusn commented on 2013-10-09 12:42

@anish I spoke too soon :| Apparently I have an issue with GIF images. The output is very can barley recognize the image. I have a .phatch script for resizing any file into a 32x32 gif image (Scale + Save). Nothing fancy, the resample function is on automatic (I've also tried all the ohter resemple options with the same result, more or less). Any ideas?

mariusn commented on 2013-10-08 09:34

@anish my dear hero/genius, everything works very well, at least for what I do with this tool, which is also the main reason I've switched from Ubuntu to Arch Linux :D Thanks a million!

P.S.: I have zero knowledge of Python programming so don't expect me to see anything in the PKGBUILD file :))

anish commented on 2013-10-08 09:28

@mariusn Well, it was mostly a lot of patching, turned out it was easier to use sed instead. It's all in the PKGBUILD.

Do let me know if anything isn't working correctly

mariusn commented on 2013-10-08 09:24

@anish you are a genius and my hero! Thank you!

P.S. How did you do that? I believe that was not only a matter of changing the requirement from python2-imaging to python2-pillow, right? right?

anish commented on 2013-10-07 21:34

@kinu updated, should be working again now.

anish commented on 2013-10-07 20:49

I actually have phatch-cli working. The gui might take a bit more time.

mariusn commented on 2013-10-07 20:40

@kinu don't bother 'cause no one will fix this package... You need to revert to python2-imaging and stay with it if you want to use this tool. Stani, the creator of phatch no longer updates this tool for ages, so don't expect him to port it to new Python technology... :(

We need someone smart to save this unique and amazing tool (that I use all day long, and I can't imagine life without it) to make a fork of it and port it to Python 3. Anyone?

kinu commented on 2013-10-07 17:15

Import image error. I think is the same thing that happened to dockbarx, because of replacing python2-imaging with python2-pillow, after update system. Regards.

anish commented on 2013-08-07 04:14

thanks, updated

mariusn commented on 2013-08-03 05:49

This package is uninstallable - Sources link needs an update, as domain is no longer working for a month now... Here's an alternative download

anish commented on 2013-04-16 05:13


FredBezies commented on 2013-04-15 08:11

Updated and working PKGBUILD :

Feel free to use it !

anish commented on 2013-04-15 06:57

can your run it from command line and paste the output ?

arnieswap commented on 2013-04-15 06:50

Can't get it to run anymore. Installed well, but not running. Any tips?

arnieswap commented on 2013-04-15 06:50

Can't get it to run anymore. Installed well, but not running. Any tips?

arnieswap commented on 2013-04-15 06:40

Can't get it to run anymore. Installed well, but not running. Any tips?

WhyNotHugo commented on 2012-12-22 18:38

"python-imaging" is now called "python2-imaging".

Muflone commented on 2012-08-12 16:57

This package is a cross platform python script.
Please change the line:
arch=('i686' 'x86_64')

anish commented on 2010-11-14 20:13

Sorry, I've been meaning up update the package for a while now, done.

Evilandi666 commented on 2010-11-14 19:55

I found another - easier - solution:

Install python2, sudo pacman -S python2

after makepkg failed,

change in phatch- in file and /phatch/ the first line from
#!/usr/bin/env python
#!/usr/bin/env python2

and in the PKGBUILD

from python install --root=${startdir}/pkg/ || return 1
to python2 install --root=${startdir}/pkg/ || return 1

make new md5sum of phatch- (md5sum phatch-

and put it in md5sums=('')

works fine!

Evilandi666 commented on 2010-11-14 19:42

I ment "edit the File /phatch/data/ in phatch-"

instead of "edit in phatch-" ..

sry :)

Evilandi666 commented on 2010-11-14 19:41

How to get it working:

After makepkg failed,

edit in phatch-

replace every string like u'bla' with 'bla', because u'<string>' is not allowed in python 3 (unicode() also!)) (in 2 both were possible)

replace from version import VERSION, DATE
BASE = "0.2.7"
VERSION = "0.2.7"
DATE = "Wed, 10 Mar 2010 18:49:51"

make new md5sum of phatch- (md5sum phatch-

and put it in md5sums=('')

After that it installs fine!

Evilandi666 commented on 2010-11-14 19:04


Traceback (most recent call last):
File "", line 42, in <module>
from data import info
File "phatch/data/", line 55
{'name': u'Erich Heine',
SyntaxError: invalid syntax

phatch/data/ has a problem :(

Evilandi666 commented on 2010-11-14 19:00

Error in
optdepends=("python-nautilus : Provides better [..]")

changed to


error gone. :)

serabob commented on 2010-11-11 15:30

Traceback (most recent call last):
File "", line 42, in <module>
from data import info
File "phatch/data/", line 55
{'name': u'Erich Heine',
SyntaxError: invalid syntax

whats the problem ?

tchgefest commented on 2010-11-01 16:31

Traceback (most recent call last):
File "/usr/bin/phatch", line 10, in <module>
import phatch
ImportError: No module named phatch

cat /usr/bin/phatch | grep python

tchgefest commented on 2010-11-01 16:29

yaourt -S phatch
Continue building phatch ? [Y/n]
==> --------------------------------
==> Building and installing package
==> ОШИБКА: Неправильный синтаксис для optdepend : 'python-nautilus : allow a better integration in nautilus'
==> Сборка пакета: phatch (Пнд Ноя 1 21:28:17 YEKT 2010)
==> Проверяю необходимые для запуска зависимости...
==> Проверяю необходимые для сборки зависимости...
==> Получение исходных файлов...
-> Найден phatch-
==> Проверка исходных файлов с помощью md5sums...
phatch- ... Готово
==> Распаковка исходных файлов...
-> Извлечение phatch- с помощью bsdtar
==> Вход в fakeroot окружение...
==> ОШИБКА: Неправильный синтаксис для optdepend : 'python-nautilus : allow a better integration in nautilus'
==> Запускается build()...
Traceback (most recent call last):
File "", line 42, in <module>
from data import info
File "phatch/data/", line 55
{'name': u'Erich Heine',
SyntaxError: invalid syntax
Преждевременный выход...
==> ERROR: Makepkg was unable to build phatch.

unhammer commented on 2010-10-19 13:55

I had to edit the first line of phatch to say


since it doesn't work with the new python package (version 3), also depends should say python2.

Also, says that pyexiv2 is optional, and I really think it should be as I and others have had problems with phatch when having that installed.

Anonymous comment on 2010-08-15 20:16

the package pil does not exist, it is named python24-pil

TiborB commented on 2010-05-24 20:13

Anish, you just posted the current version of pyexiv2 MAKEPKG, that did not work for me. I tried it now once more - the same, it dont work...
Never mind - it is not urgent for me....

anish commented on 2010-05-23 23:05

This works for me :
pkgdesc="a python binding to exiv2"
depends=('python' 'boost' 'exiv2')
arch=('i686' 'x86_64')

anish commented on 2010-05-23 21:06

@TiborB, I just tried it on a new machine, and it compiles and work fine for me, maybe there is something else missing here. Can you try setting your CFLAGS to the defaults in makepkg.conf and see if it makes a difference ?

TiborB commented on 2010-05-23 21:03

I don't remember editing makepkg.conf (maybe during installation of OS?), so that line looks like this:
CFLAGS="-march=i686 -mtune=generic -O2 -pipe"

But problem might be with PKGBUILD, I dont know where to get older version (if possible at all), so I just modified current one, and changed following lines:

If there are more differencies, please let me know...

anish commented on 2010-05-23 20:52

@TiborB, I just tried it on a new machine, and it compiles and work fine for me, maybe there is something else missing here. Can you try setting your CFLAGS to the defaults in makepkg.conf and see if it makes a difference ?

TiborB commented on 2010-05-23 20:47

I see.
But I have no older packages of pyexiv2 on my box, and v 0.1.3 failed to compile:

g++ -o build/libpyexiv2.os -c -fPIC -I/usr/include/python2.6 src/libpyexiv2.cpp
src/libpyexiv2.cpp: In member function 'boost::python::tuple LibPyExiv2::Image::setIptcTag(std::string, std::string, unsigned int)':
src/libpyexiv2.cpp:231: error: 'Exiv2::FindMetadatumById' has not been declared
src/libpyexiv2.cpp: In member function 'boost::python::tuple LibPyExiv2::Image::deleteIptcTag(std::string, unsigned int)':
src/libpyexiv2.cpp:269: error: 'Exiv2::FindMetadatumById' has not been declared
scons: *** [build/libpyexiv2.os] Error 1
scons: building terminated because of errors.
==> ERROR: Build Failed.

Anyway, I'm not going to investigate what is wrong and will just wait till it is fixed 'upstream', I hope it will not take too long... and thanks for very fast answer...

anish commented on 2010-05-23 20:32

@TiborB you are getting that error because pyexiv changed their API a bit, can't be fixed till phatch updates. In the meantime, try an older version of pyexiv

TiborB commented on 2010-05-23 20:25

Hi, I run into this error:

Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/phatch/core/", line 493, in get_photo
photo = pil.Photo(info_file, info_not_file)
File "/usr/lib/python2.6/site-packages/phatch/core/", line 457, in __init__
File "/usr/lib/python2.6/site-packages/phatch/core/", line 183, in __init__
self.pyexiv2 = pyexiv2.Image(path)
AttributeError: 'module' object has no attribute 'Image'

Or is it problem with pyexiv? No images are of course processed.....

anish commented on 2010-05-04 23:55

@stani @dinux dependencies are fixed now

s_m commented on 2010-05-04 21:10

Please file a bug with your traceback here:

Phatch failed to display the error correctly. Phatch 0.2 depends on locate or mlocate. Anish can you provide me a list of the dependencies of Phatch in archlinux, so I can check if they are complete?

dinux commented on 2010-05-04 09:13

I found the problem. There was mlocate package. Somehow it was not installed on my system.

dinux commented on 2010-05-04 09:07

Yes, i have all dependencies.
All versions of 0.1.* works just fine, but 0.2.* - NOT. On my other Archlinux box works all versions 0.2.*

anish commented on 2010-05-03 23:34

can you check if installing python-imaging makes a difference for you ?

dinux commented on 2010-05-03 22:31

Thanks for fast update, but now i have a problem:
[dinux@dinux ~]$ phatch
Traceback (most recent call last):
File "/usr/bin/phatch", line 10, in <module>
import phatch
File "/usr/lib/python2.6/site-packages/phatch/", line 25, in <module>
File "/usr/lib/python2.6/site-packages/phatch/core/", line 225, in init_config_paths
from lib.fonts import set_font_cache
File "/usr/lib/python2.6/site-packages/phatch/lib/", line 53, in <module>
sys.exit(_('Please install "%s" first.') % 'locate')
NameError: name '_' is not defined

anish commented on 2010-05-03 22:26

updated to latest