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

sqlite3.OperationalError #94

Closed
visibilityspots opened this issue Apr 15, 2014 · 9 comments
Closed

sqlite3.OperationalError #94

visibilityspots opened this issue Apr 15, 2014 · 9 comments

Comments

@visibilityspots
Copy link

Hi since a few months I can't use pycardsyncer anymore. I installed pycarddav using pip on an archlinux machine.

Any idea in which direction I should look to solve this?

Thanks in advance

DEBUG:root:made sure version table exists
DEBUG:root:made sure accounts table exists 
Traceback (most recent call last):
  File "/usr/bin/pycardsyncer", line 55, in <module>
    sync(conf)
  File "/usr/lib/python2.7/site-packages/pycarddav/controllers/sync.py", line 51, in sync
    my_dbtool.check_account_table(conf.account.name, conf.account.resource)
  File "/usr/lib/python2.7/site-packages/pycarddav/backend.py", line 199, in check_account_table
    self.sql_ex(sql_s)
  File "/usr/lib/python2.7/site-packages/pycarddav/backend.py", line 177, in sql_ex
    self.cursor.execute(statement, stuple)
sqlite3.OperationalError: near "_r": syntax error
@geier
Copy link
Owner

geier commented Apr 16, 2014

did you delete the old database file?

@visibilityspots
Copy link
Author

Yes tried that by deleting the db file ~/.pycard/abook.db when rerunning the same error occurs and a new abook.db file is generated.

@geier
Copy link
Owner

geier commented Apr 16, 2014

can you please paste the whole output of pycardsyncer --debug (you can obviously redact person details like your username or the domain of the resource)

@visibilityspots
Copy link
Author

Sure

$ pycardsyncer --debug
DEBUG:root:Using configuration from /home/USER/.pycard/pycard.conf
DEBUG:root:Ignoring default:debug in configuration file
DEBUG:root:Using configuration:          
DEBUG:root:     accounts:                
DEBUG:root:             auth: basic   
DEBUG:root:             name: 'NAME'  
DEBUG:root:             resource: https://URL/
DEBUG:root:             user: USER       
DEBUG:root:             verify: False 
DEBUG:root:             write_support: False
DEBUG:root:     accounts:                
DEBUG:root:             auth: basic   
DEBUG:root:             name: 'NAME2' 
DEBUG:root:             resource: https://URL2/
DEBUG:root:             user: USER       
DEBUG:root:             verify: False 
DEBUG:root:             write_support: False
DEBUG:root:     debug: True              
DEBUG:root:     filename: /home/USER/.pycard/pycard.conf
DEBUG:root:     sqlite:                  
DEBUG:root:             path: /home/USER/.pycard/abook.db
DEBUG:root:     sync:                    
DEBUG:root:             accounts: set(["'NAME'", "'NAME2'"])
DEBUG:root:start syncing account 'NAME'
DEBUG:root:made sure version table exists
DEBUG:root:made sure accounts table exists
Traceback (most recent call last):       
  File "/usr/bin/pycardsyncer", line 55, in <module>                                                                                                                                                                                           
    sync(conf)                           
  File "/usr/lib/python2.7/site-packages/pycarddav/controllers/sync.py", line 51, in sync
    my_dbtool.check_account_table(conf.account.name, conf.account.resource)
  File "/usr/lib/python2.7/site-packages/pycarddav/backend.py", line 199, in check_account_table
    self.sql_ex(sql_s)                   
  File "/usr/lib/python2.7/site-packages/pycarddav/backend.py", line 177, in sql_ex
    self.cursor.execute(statement, stuple)
sqlite3.OperationalError: near "_r": syntax error

@geier
Copy link
Owner

geier commented Apr 16, 2014

do you by any chance have a blank in your account name? or perhaps a trailing blank, like: [Account home ]?

@visibilityspots
Copy link
Author

the account names are individual words Contacts and Colleagues..

@geier
Copy link
Owner

geier commented Apr 16, 2014

Do you have anything like " or ' around them (as your output would suggest)?

@visibilityspots
Copy link
Author

geier your are the man! that indeed solved the issue, [account 'Contacts']

I changed them to [account Contacts] and know I have again a database full of contacts I can use in mutt.

Thank you very much for pointing me to this stupid error.. You made my day :)

@geier
Copy link
Owner

geier commented Apr 16, 2014

While its good that we solved your problem, this still needs to be solved for everybody. I have reissued this as #95.

@geier geier closed this as completed Apr 16, 2014
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