GithubHelp home page GithubHelp logo

icloud-addressbook-query's People

Contributors

andrewlkho avatar djmoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

icloud-addressbook-query's Issues

Support for accented characters is broken

Although accented characters are displayed correctly from the command line, mutt does not appear to handle them well. This bug was submitted via e-mail by Ronaldo Vasconcellos. Here is his message in full:

Hello Andrew.

Just a feedback from a Brazilian user.

The script works like a charm for me, except when my contact has accents on its
name (which are common in Brazilian portuguese). The error happens only inside
mutt, not when run from the terminal.

To: fabioTraceback (most recent call last):
File "/usr/local/bin/icloud-addressbook-query.py", line 55, in
main()
File "/usr/local/bin/icloud-addressbook-query.py", line 52, in main
output(query_db(sys.argv[1]))
File "/usr/local/bin/icloud-addressbook-query.py", line 44, in output
print "\t".join([row[0], fn])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in positi
on 25: ordinal not in range(128)

Outside mutt it works:

$ /usr/local/bin/icloud-addressbook-query.py fabio
3 matching addresses...
[email protected] Fábio XXX
[email protected] Fábio XXX
fabio3@example Fábio XXX

Any clue of what's going on here? Seems like a character encoding issue.

My terminal setup is slightly different from usual. I'm using iTerm
(http://www.iterm2.com/#/section/home) and Fish (http://fishshell.com/) shell.

Cheers,
Ron

"expected string or Unicode, NoneType found" when retrieving a particular contact

Hello Andrew,

I'm encountering the following error when retrieving a particular contact.

The contact's email address has a hyphen (-) in it; do you think that would cause the problem? Other contacts can be searched without issue.

icloud-addressbook-query $ python icloud-addressbook-query.py Jeff
1 matching addresses...
Traceback (most recent call last):
  File "icloud-addressbook-query.py", line 56, in <module>
    main()
  File "icloud-addressbook-query.py", line 53, in main
    output(query_db(sys.argv[1]))
  File "icloud-addressbook-query.py", line 44, in output
    out = "\t".join([row[0], fn])
TypeError: sequence item 1: expected string or Unicode, NoneType found
icloud-addressbook-query $ python --version
Python 2.7.5

Thanks for this useful utility. I've been happily using it for the past year or so.

Mike

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.