Bug 570196 - [abrt] crash in gbirthday-0.6.3-1.fc12: databases.py:229:parse:AttributeError: 'NoneType' object has no attribute 'list_addressbooks'
Summary: [abrt] crash in gbirthday-0.6.3-1.fc12: databases.py:229:parse:AttributeError...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gbirthday
Version: 12
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Thomas Spura
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:648c49f9
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-03 15:38 UTC by youry
Modified: 2010-04-27 02:21 UTC (History)
1 user (show)

Fixed In Version: gbirthday-0.6.4-1.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-10 00:05:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (966 bytes, text/plain)
2010-03-03 15:38 UTC, youry
no flags Details

Description youry 2010-03-03 15:38:54 UTC
abrt 1.0.7 detected a crash.

architecture: i686
cmdline: /usr/bin/python /usr/bin/gbirthday
component: gbirthday
executable: /usr/bin/gbirthday
kernel: 2.6.31.12-174.2.22.fc12.i686.PAE
package: gbirthday-0.6.3-1.fc12
reason: databases.py:229:parse:AttributeError: 'NoneType' object has no attribute 'list_addressbooks'
release: Fedora release 12 (Constantine)

backtrace
-----
databases.py:229:parse:AttributeError: 'NoneType' object has no attribute 'list_addressbooks'

Traceback (most recent call last):
  File "/usr/bin/gbirthday", line 4, in <module>
    main()
  File "/usr/lib/python2.6/site-packages/gbirthday/__init__.py", line 187, in main
    addressbook.reload()
  File "/usr/lib/python2.6/site-packages/gbirthday/addressbook.py", line 85, in reload
    database.parse(addressbook=self, conf=self.conf)
  File "/usr/lib/python2.6/site-packages/gbirthday/databases.py", line 229, in parse
    for book in evolution.ebook.list_addressbooks():
AttributeError: 'NoneType' object has no attribute 'list_addressbooks'

Local variables in innermost frame:
evolution: <module 'evolution' from '/usr/lib/python2.6/site-packages/gtk-2.0/evolution/__init__.pyc'>
addressbook: <gbirthday.addressbook.AddressBook instance at 0xb73b860c>
self: <gbirthday.databases.Evolution instance at 0xb739fbec>
conf: <gbirthday.Conf instance at 0xb76faa6c>

Comment 1 youry 2010-03-03 15:38:55 UTC
Created attachment 397585 [details]
File: backtrace

Comment 2 Thomas Spura 2010-03-03 22:45:49 UTC
Thanks for the bug report.

How can this be reproduced?

I don't see, why there shouldn'd be an evolution addressbook.

If you don't have a evolution addressbook and use 'just' the other databases, you could try disabling evolution in the preferences, so this is unlikely to happen again.
(If it does not work you could adjust your settings manually in ~/.gbirthdayrc)

Could you please post your ~/.gbirthdayrc?

Comment 3 youry 2010-03-04 01:10:02 UTC
Hi Thomas,

Thanks for the explanation. I thought the birth reminder is not only for the evolution. I use Thunderbirds now, but not Evolution. It would be better to rename gbirthday for evolution gbirthday or to have a check for such type of problems. I removed the birthreminder from the preferences. 

Thanks a lot!

Youry

PS But in any case that's a small bug.

Comment 4 Thomas Spura 2010-03-04 01:20:57 UTC
Hmm, it started with a birthday reminder just for evolution and the rest was added after that.

The problem is, when gbirthday is initially started something has to be guessed by default.

The only thing, which comes to my mind, to solve this is:
Check if there is a evolution book and if not, advise to disable in preferences like here in the bug... :)

I think, I'll implement this, but maybe you have another idea...

Comment 5 youry 2010-03-04 01:45:21 UTC
Hi Thomas,

I just found that my Evolution is still working well and I have 2 Contacts databases in Evolution: the first is connected to gmail account and second one is local. 

and I have the following in ~/.gbirthdayrc:

[main]
notify_future_bdays = 0
csv_files = None
firstday = -2
databases = Evolution|Lightning
lastday = 30

[mysql]
username =
database =
name_row = name
date_row = date
host = localhost
table = person
password =
port = 3306

Thanks,

Youry

PS By the way, I had no such problems before for about a year. This problem just started couple weeks ago. I used Fedora 11 and then upgraded to Fedora 12 about month or two ago.
PPS I moved from Evolution to Thunderbirds, because had a problem with gmail calendar, but I see that problem is already solved.

Comment 6 Thomas Spura 2010-03-04 13:07:55 UTC
Does that mean now gbirthday works again with evolution contacts?

Or is the crash still there?

(If you have 2 databases in Evolution, gbirthday should get them properly.)

Comment 7 youry 2010-03-06 07:23:46 UTC
Now I don't have any problem with gbirthday for the last couple day, but I did nothing. I simply started Evolution and checked the address book.

Thanks,

Youry

Comment 8 Thomas Spura 2010-03-10 00:05:29 UTC
The next time, gbirthday will silently ignore, that you don't have an evolution addressbook. Fixed in git:
http://gbirthday.git.sourceforge.net/git/gitweb.cgi?p=gbirthday/gbirthday;a=commitdiff;h=d5365c4d5cba014fbcb9e7ac97291cce3de4727e

Because this bug seems to be solved for you, backporting this fix, is not nessessary.

If you continue to have this problem, give me a holler and I'll do the backporting. If not, this will go into the next version of gbirthday (currently not planed, maybe next week, maybe next month).

Closing as UPSTREAM.

Comment 9 Fedora Update System 2010-04-16 20:03:15 UTC
gbirthday-0.6.4-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/gbirthday-0.6.4-1.fc12

Comment 10 Fedora Update System 2010-04-16 20:03:34 UTC
gbirthday-0.6.4-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/gbirthday-0.6.4-1.fc11

Comment 11 Fedora Update System 2010-04-16 20:03:50 UTC
gbirthday-0.6.4-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/gbirthday-0.6.4-1.fc13

Comment 12 Fedora Update System 2010-04-27 02:13:35 UTC
gbirthday-0.6.4-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2010-04-27 02:16:18 UTC
gbirthday-0.6.4-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2010-04-27 02:21:03 UTC
gbirthday-0.6.4-1.fc13 has been pushed to the Fedora 13 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.