Bug 747472 - [abrt] recoll-1.15.8-2.fc15: rclexecm.py:122:processmessage:UnboundLocalError: local variable 'eof' referenced before assignment
Summary: [abrt] recoll-1.15.8-2.fc15: rclexecm.py:122:processmessage:UnboundLocalError...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: recoll
Version: 15
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Terje Røsten
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:925cfe211d42b83e32ded9c335b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-19 23:46 UTC by Doug Hutcheson
Modified: 2011-11-25 02:33 UTC (History)
1 user (show)

Fixed In Version: recoll-1.16.1-2.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-25 01:57:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Doug Hutcheson 2011-10-19 23:46:53 UTC
abrt version: 2.0.3
architecture:   x86_64
cmdline:        
comment:        Just ran recoll.
component:      recoll
executable:     /usr/share/recoll/filters/rclkar
kernel:         2.6.40.6-0.fc15.x86_64
os_release:     Fedora release 15 (Lovelock)
package:        recoll-1.15.8-2.fc15
reason:         rclexecm.py:122:processmessage:UnboundLocalError: local variable 'eof' referenced before assignment
time:           Thu Oct 20 09:42:24 2011
uid:            500
username:       doug

backtrace:
:rclexecm.py:122:processmessage:UnboundLocalError: local variable 'eof' referenced before assignment
:
:Traceback (most recent call last):
:  File "/usr/share/recoll/filters/rclkar", line 322, in <module>
:    rclexecm.main(proto, extract)
:  File "/usr/share/recoll/filters/rclexecm.py", line 154, in main
:    proto.mainloop(extract)
:  File "/usr/share/recoll/filters/rclexecm.py", line 147, in mainloop
:    self.processmessage(processor, params)
:  File "/usr/share/recoll/filters/rclexecm.py", line 122, in processmessage
:    self.answer("", "", eof, RclExecM.fileerror)
:UnboundLocalError: local variable 'eof' referenced before assignment
:
:Local variables in innermost frame:
:ipath: ''
:self: <rclexecm.RclExecM instance at 0xb4a050>
:params: {'mimetype:': 'audio/x-karaoke', 'dflincs:': 'UTF-8', 'filename:': '/home/doug/Music/music-videos/premade-midi-files/moonlight_sonata.mid'}
:processor: <__main__.KarTextExtractor instance at 0xb34d88>
:err: AttributeError("'NoneType' object has no attribute 'lower'",)

Comment 1 Terje Røsten 2011-10-20 17:40:25 UTC
Thanks for your report.

Could you please the updated recoll package recoll-1.16.1 available in updates-testing?

Test update is here:

 https://admin.fedoraproject.org/updates/FEDORA-2011-14534

Comment 2 Doug Hutcheson 2011-10-21 20:14:18 UTC
I enabled updates-testing and installed the latest recoll. It caused the same abrt report as previously reported.

Incidentally, the 'About' dialog reports the version as 1.16.0, but yum reports:
"Package recoll-1.16.1-1.fc15.x86_64 already installed and latest version".

Comment 3 Doug Hutcheson 2011-10-24 02:04:19 UTC
Looking at rclexecm.py, the offending statement (line 122) is the self.answer() call in the exception handler in the following code fragment:
        try:
            if params.has_key("ipath:") and len(params["ipath:"]):
                ok, data, ipath, eof = processor.getipath(params)
            else:
                ok, data, ipath, eof = processor.getnext(params)
        except Exception, err:
            self.answer("", "", eof, RclExecM.fileerror)
            return

I am not a python expert, but it looks possible that the if/else block might cause the variables 'ok, data, ipath, eof' to spring into existence because of the assignment. If that conclusion is right, then it follows that they would NOT have been created at the time the exception handler is called. Would the solution be to declare a variable 'eof' and assign it a value, before entering the try/except block?

I know in C that variables must be predeclared, but I am not sure about python: perhaps I am completely wrong "8-)

Comment 4 Fedora Update System 2011-10-24 21:25:55 UTC
recoll-1.16.1-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/FEDORA-2011-14568

Comment 5 Fedora Update System 2011-10-24 21:28:36 UTC
recoll-1.16.1-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/FEDORA-2011-14550

Comment 6 Fedora Update System 2011-10-24 21:30:01 UTC
recoll-1.16.1-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/FEDORA-2011-14534

Comment 7 Fedora Update System 2011-10-25 03:06:56 UTC
Package recoll-1.16.1-2.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing recoll-1.16.1-2.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14568
then log in and leave karma (feedback).

Comment 8 Doug Hutcheson 2011-10-26 01:36:41 UTC
Will the FC16 version work OK with my FC15 system?

Comment 9 Terje Røsten 2011-10-26 06:00:15 UTC
Might be, however why not use the FC15 version? 

Versions for FC14 and FC15 will be pushed soon. 

Or get packages directly from koji:

 http://koji.fedoraproject.org/koji/buildinfo?buildID=270466

Comment 10 Doug Hutcheson 2011-11-01 06:48:25 UTC
recoll-1.16.1-2.fc15 has solved the problem. Thank you for your help.

Comment 11 Fedora Update System 2011-11-25 01:57:03 UTC
recoll-1.16.1-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2011-11-25 02:29:44 UTC
recoll-1.16.1-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2011-11-25 02:33:18 UTC
recoll-1.16.1-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


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