Bug 646035 - [abrt] phatch-cli-0.2.7-2.fc14: api.py:780:apply_actions_to_photo:AttributeError: 'NoneType' object has no attribute 'close'
Summary: [abrt] phatch-cli-0.2.7-2.fc14: api.py:780:apply_actions_to_photo:AttributeEr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: phatch
Version: 14
Hardware: x86_64
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Narasimhan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:eefed90b
: 629078 657774 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-23 22:16 UTC by dinyar.rabady+spam
Modified: 2011-06-25 10:19 UTC (History)
7 users (show)

Fixed In Version: phatch-0.2.7-2.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-25 02:38:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.53 KB, text/plain)
2010-10-23 22:16 UTC, dinyar.rabady+spam
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 704703 0 high CLOSED Error processing jpg files, 'module' object has no attribute 'Image' in phatch 2021-02-22 00:41:40 UTC

Internal Links: 704703

Description dinyar.rabady+spam 2010-10-23 22:16:20 UTC
abrt version: 1.1.13
architecture: x86_64
cmdline: /usr/bin/python /usr/bin/phatch
component: phatch
executable: /usr/bin/phatch
kernel: 2.6.35.6-43.fc14.x86_64
package: phatch-cli-0.2.7-2.fc14
reason: api.py:780:apply_actions_to_photo:AttributeError: 'NoneType' object has no attribute 'close'
release: Fedora release 14 (Laughlin)
time: 1287847955
uid: 500

backtrace
-----
api.py:780:apply_actions_to_photo:AttributeError: 'NoneType' object has no attribute 'close'

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

Local variables in innermost frame:
repeat: 1
image_index: 0
photo: None
cache: {}
is_done: <bound method Action.is_done of <actions.save_metadata.Action object at 0x268e390>>
actions: [<actions.geotag.Action object at 0x3b90350>, <actions.save_metadata.Action object at 0x268e390>]
image_info: {'index': 0, 'subfolder': u'', 'type': u'jpg', 'folderindex': 0, 'filename': u'1279035540280', 'foldername': u'HEPHY@CERN', 'path': u'/home/dinyar/Pictures/HEPHY@CERN/1279035540280.jpg', 'folder': u'/home/dinyar/Pictures/HEPHY@CERN', 'desktop': '/home/dinyar/Desktop', 'root': u'/home/dinyar/Pictures'}
info_not_file: <lib.metadata.InfoExtract instance at 0x3ed69e0>
result: {'answer': u'skip', 'skip': True, 'abort': False, 'stop_for_errors': True, 'last_answer': u'skip'}
read_only_settings: <lib.odict.ReadOnlyDict instance at 0x3ed6b00>
report: []
skip_existing_images: False

How to reproduce
-----
1. Tried to geotag some jpegs
2.
3.

Comment 1 dinyar.rabady+spam 2010-10-23 22:16:22 UTC
Created attachment 455294 [details]
File: backtrace

Comment 2 Michal Klich 2010-12-13 17:53:21 UTC
Package: phatch-cli-0.2.7-3.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Open software
2. Use Delete Tags method
3. Process pictures


Comment
-----
I tried to remove metatags from pictures.

Comment 3 Jeff Guerdat 2010-12-21 16:01:48 UTC
Package: phatch-cli-0.2.7-3.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1.Added actions (crop and save)
2.Tried to execute
3.

Comment 4 Jeff Guerdat 2010-12-21 16:11:04 UTC
This was reported 2 months ago and no comment/action?

Comment 5 Nicoleau Fabien 2010-12-22 09:10:56 UTC
Hi, I'm sorry for the delay ... but I have to admit that I don't really know what to do. 
Like other bugs on phatch, this one seems to appear because of the incompatibility between phatch an pyexiv2.

The bug is reported upstream :
https://bugs.launchpad.net/phatch/+bug/585169

Comment 6 leandro 2010-12-24 18:04:12 UTC
Package: phatch-cli-0.2.7-3.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. create an action
2. drop some images on Phatch and click 'batch'
3. the program stops and does nothing

Comment 7 Guillaume Armspach 2011-01-24 20:20:33 UTC
Package: phatch-cli-0.2.7-3.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Le traitement d'une image pose problème et l'erreur survient lorsque je clique sur "Skip to next image".

Comment 8 terrmit 2011-02-04 23:45:57 UTC
Package: phatch-cli-0.2.7-3.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1.?
2.
3.

Comment 9 Cristian Ciupitu 2011-02-12 12:36:00 UTC
Package: phatch-cli-0.2.7-3.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. I was trying to scale (down) some JPG images.

Comment
-----
There were some AVI files as well in that directory.

Comment 10 Cristian Ciupitu 2011-02-12 12:48:48 UTC
If I abort the log shows me:

Error 0:Unable to open file: /home/ciupicri/work/kineto/.../DSCF0957.jpg:
'module' object has no attribute 'Image'

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

I have pyexiv2-0.2.2-2.fc14.x86_64.

Comment 11 Fedora Admin XMLRPC Client 2011-02-13 02:57:50 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 12 Narasimhan 2011-03-23 14:44:42 UTC
Error 0:Unable to open file: /home/ciupicri/work/kineto/.../DSCF0957.jpg:
'module' object has no attribute 'Image'

This is another issue being tracked by this bug

https://bugs.launchpad.net/phatch/+bug/585169

Comment 13 FC_rules 2011-03-23 17:48:44 UTC
Package: phatch-cli-0.2.7-3.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. Tried to add text on some pics and it crashes.
2.
3.

Comment 14 Narasimhan 2011-03-23 17:52:18 UTC
FC_rules,
Thanks for confirming. I will mark 657774 as a duplicate of this bug.

Comment 15 Narasimhan 2011-03-23 17:52:31 UTC
*** Bug 657774 has been marked as a duplicate of this bug. ***

Comment 16 terrmit 2011-03-30 14:56:44 UTC
Package: phatch-cli-0.2.7-3.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. ?
2.
3.

Comment 17 Narasimhan 2011-05-12 19:36:14 UTC
I was able to fix the crash problem and also this issue 

Error 0:Unable to open file: <abc>.jpg:
'module' object has no attribute 'Image'

After this fix, jpg files can be processed without any issues. Will create an update.

Comment 18 Narasimhan 2011-05-12 19:37:24 UTC
*** Bug 629078 has been marked as a duplicate of this bug. ***

Comment 19 Fedora Update System 2011-05-14 07:37:50 UTC
phatch-0.2.7-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/phatch-0.2.7-4.fc14

Comment 20 Fedora Update System 2011-05-14 07:37:59 UTC
phatch-0.2.7-5.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/phatch-0.2.7-5.fc15

Comment 21 Narasimhan 2011-05-14 07:55:41 UTC
The above updates fix only the crash issue. I am still working on fixing the processing of jpg files. Will contact the author with my patch and get his comments.

Comment 22 Narasimhan 2011-05-14 07:58:17 UTC
bug 704703  tracks the issues with processing jpg files in phatch.

Comment 23 Fedora Update System 2011-05-16 10:26:14 UTC
phatch-0.2.7-2.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/phatch-0.2.7-2.fc13

Comment 24 Fedora Update System 2011-05-17 00:51:56 UTC
Package phatch-0.2.7-2.fc13:
* should fix your issue,
* was pushed to the Fedora 13 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing phatch-0.2.7-2.fc13'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/phatch-0.2.7-2.fc13
then log in and leave karma (feedback).

Comment 25 Jeff Guerdat 2011-05-17 12:06:26 UTC
Changed the above yum update to phatch-0.2.7.4.fc14 and updated.  No crash but as noted earlier, it only fixes the crash issue:

Error 0:Unable to open file: /home/jguerdat/Desktop/100EOS5D/IMG_0986.JPG:
'module' object has no attribute 'Image'


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

Comment 26 Narasimhan 2011-05-18 06:37:24 UTC
Hello ,
Thanks for testing. 

>Error 0:Unable to open file: /home/jguerdat/Desktop/100EOS5D/IMG_0986.JPG:
>'module' object has no attribute 'Image'
This is a api compatibility issue between phatch and pyexiv2. I am working on creating a patch and sending it to the author. In between , I will work on integrating the patch and testing it locally.

Please refer to https://bugzilla.redhat.com/show_bug.cgi?id=704703 for tracking the above issue.

Comment 27 Fedora Update System 2011-05-25 02:37:56 UTC
phatch-0.2.7-5.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 28 Jeff Guerdat 2011-05-25 12:52:15 UTC
Maybe I misunderstand but installing on F14 still gives me:

Error 0:Unable to open file: /home/jguerdat/Desktop/Ashlyn/IMG_1171.JPG:
'module' object has no attribute 'Image'


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

I thought this version implied a complete fix?

Comment 29 Narasimhan 2011-05-25 13:01:10 UTC
Hi Jeff,
No, this update does not completely fix the issue. Only the crash problem reported by abrt.

This issue 'module' object has no attribute 'Image' occurs due to incompatibility between phatch and pyexiv2. 

bug 704703   tracks the above issue.

Comment 30 Fedora Update System 2011-05-25 18:53:03 UTC
phatch-0.2.7-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Fedora Update System 2011-05-25 18:56:02 UTC
phatch-0.2.7-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 32 Narasimhan 2011-06-24 18:09:16 UTC
A fix has been identified for bug 704703 . I have patched phatch to be compatible with the new api of pyexiv2. 

I will submit an update.

Comment 34 Jeff Guerdat 2011-06-24 20:17:02 UTC
phatch-0.2.7-6.fc15 works fine for my limited test.

Comment 35 Narasimhan 2011-06-25 10:19:58 UTC
Thanks Jeff. 

Just updated 704703 with new builds. This update also takes care of missing exif tags, comments and thumbnail issues. If you have time, please test the new update.


Note You need to log in before you can comment on or make changes to this bug.