Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatible with vobject 0.9 #126

Open
plega opened this issue Jul 9, 2016 · 5 comments
Open

incompatible with vobject 0.9 #126

plega opened this issue Jul 9, 2016 · 5 comments

Comments

@plega
Copy link

plega commented Jul 9, 2016

Certain string searches using pc_query fail with the following message:

plega@serpentine pycarddav$ pc_query "Philip"
searching for Philip...
Traceback (most recent call last):
File "/usr/bin/pc_query", line 4, in
import('pkg_resources').run_script('pyCardDAV===0.7.0.dev-29-gedc9150', 'pc_query')
File "/usr/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/pkg_resources/init.py", line 735, in run_script
File "/usr/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/pkg_resources/init.py", line 1659, in run_script
File "/usr/lib/python2.7/site-packages/pyCardDAV-0.7.0.dev_29_gedc9150-py2.7.egg/EGG-INFO/scripts/pc_query", line 138, in

File "build/bdist.linux-x86_64/egg/pycarddav/controllers/query.py", line 60, in query
File "build/bdist.linux-x86_64/egg/pycarddav/controllers/query.py", line 118, in search
File "build/bdist.linux-x86_64/egg/pycarddav/backend.py", line 122, in search
File "build/bdist.linux-x86_64/egg/pycarddav/backend.py", line 122, in
File "build/bdist.linux-x86_64/egg/pycarddav/backend.py", line 355, in get_vcard_from_data
File "build/bdist.linux-x86_64/egg/pycarddav/model.py", line 142, in vcard_from_string
File "build/bdist.linux-x86_64/egg/pycarddav/model.py", line 110, in vcard_from_vobject
File "build/bdist.linux-x86_64/egg/pycarddav/model.py", line 103, in fix_vobjectname
AttributeError: 'Name' object has no attribute 'strip'

Interestingly, pc_query exits gracefully if the search string is not found; and when the string is found it often provides the correct output. The funny thing is that it seems to fail when the search string scores a hit on a word that's in the database with a preceding space (but I haven't done exhaustive testing).

This was working perfectly - but I upgraded from Fedora 23 to 24 and now it's broken. Any suggestions ? Same problem with v0.7.0 and with the current dev version referenced above.

@plega
Copy link
Author

plega commented Jul 9, 2016

In case it's useful, here's the DEBUG output prior to the above error output:

DEBUG:root:Using configuration from /home/plega/.config/pycard/pycard.conf
DEBUG:root:Ignoring query:where in configuration file
DEBUG:root:Ignoring default:debug in configuration file
DEBUG:root:Using configuration:
DEBUG:root: accounts:
DEBUG:root: auth: basic
DEBUG:root: name: domestic
DEBUG:root: passwd_cmd:
DEBUG:root: resource: http://localhost:8885/caldav.php/plega/addresses/
DEBUG:root: user: plega
DEBUG:root: verify: True
DEBUG:root: write_support: True
DEBUG:root: debug: True
DEBUG:root: filename: /home/plega/.config/pycard/pycard.conf
DEBUG:root: query:
DEBUG:root: backup: None
DEBUG:root: delete: False
DEBUG:root: display_all: False
DEBUG:root: importing: None
DEBUG:root: mutt_format: False
DEBUG:root: search_string: Philip
DEBUG:root: tel: False
DEBUG:root: where: vcard
DEBUG:root: sqlite:
DEBUG:root: path: /home/plega/.pycard/abook.db
DEBUG:root: sync:
DEBUG:root: accounts: ['domestic']
DEBUG:root:made sure version table exists
DEBUG:root:made sure accounts table exists
searching for Philip...
DEBUG:root:vcard has no formatted name, reconstructing...
Traceback (most recent call last):

@geier
Copy link
Owner

geier commented Jul 11, 2016

what's your vobject version?

@plega
Copy link
Author

plega commented Jul 12, 2016

v0.9.2

I'll try reinstalling it and let you know how I get on - it'll probably
be a couple of days until I get to it.

Regards

Philip

On Mon, Jul 11, 2016 at 08:46:21PM +0100, Christian Geier wrote:

what's your vobject version?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#126 (comment)

Philip Allen
9 Bardwell Road
Oxford OX2 6SU +44-1865-311711
United Kingdom plega@armitstead.com

@plega
Copy link
Author

plega commented Jul 13, 2016

I have replaced vobject v0.9.2 with v0.8.2 and the problem has gone away.

@plega plega closed this as completed Jul 13, 2016
@geier geier changed the title 'Name' object has no attribute 'strip' incompatible with vobject 0.9 Jul 19, 2016
@geier geier reopened this Jul 19, 2016
@geier
Copy link
Owner

geier commented Jul 19, 2016

reopened to remind me (and other people) that we are currently not compatible with vobject 0.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants