UnicodeDecodeError with python API

2015-03-29 Thread W. Trevor King
- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20150329/370a9519/attachment.pgp>

[PATCH] notmuch-emacs-mua: non-forking escape () usage with backslash '\' escape

2015-03-29 Thread Tomi Ollila
Use the printf -v convention to give output variable as argument to escape () function so no subshell needs to be executed for escaping input. The '-v' option to escape () is just syntactic sugar for better understanding. Also, backslash is now escaped with another backslash for emacs. This ie

UnicodeDecodeError with python API

2015-03-29 Thread Sebastian Fischmeister
> My first guess is that the file's encoding doesn't match your locale. > Do you have a non-ASCII locale set? You can check with: It seems to be more tricky than I thought. I didn't have a locale set. When I set one, I can parse some emails with this: export LANG=en_US.latin-1 Others with

[PATCH] test/thread-order: more robust loop exit in case of broken input

2015-03-29 Thread Tomi Ollila
When creating $THREADS data it may end of not having 'None' at all or the numbers in line output yields a loop. To avoid loop the value in current array index is set to 'None' so that if the same item is reached again the loop will end. Also empty string as next array index will end the loop.

UnicodeDecodeError with python API

2015-03-29 Thread W. Trevor King
oublesome message? Cheers, Trevor -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20150329/45fe6e5c/attachment.pgp>

UnicodeDecodeError with python API

2015-03-29 Thread Sebastian Fischmeister
Hi, I'm trying to use the python API for notmuch, and get the following error: --- Traceback (most recent call last): File "./test.py", line 66, in print(type(y.get_part(1))) File "/usr/lib/python3.4/site-packages/notmuch/message.py", line 602, in get_part parts =

[Patch v6 4/8] lib: add "verbose" versions of notmuch_database_{open,create}

2015-03-29 Thread David Bremner
Tomi Ollila writes: > > Just that this small piece of code above git pass my sparse sieve, perhaps > this could be amended to: > > if (message) { > if (status_string) > *status_string = message; > else > free(message); > } > I amended and pushed.

[PATCH] test/thread-order: more robust loop exit in case of broken input

2015-03-29 Thread Tomi Ollila
When creating $THREADS data it may end of not having 'None' at all or the numbers in line output yields a loop. To avoid loop the value in current array index is set to 'None' so that if the same item is reached again the loop will end. Also empty string as next array index will end the loop.

Re: UnicodeDecodeError with python API

2015-03-29 Thread W. Trevor King
On Sun, Mar 29, 2015 at 07:10:53PM -0400, Sebastian Fischmeister wrote: My first guess is that the file's encoding doesn't match your locale. Do you have a non-ASCII locale set? You can check with: It seems to be more tricky than I thought. I didn't have a locale set. When I set one, I

UnicodeDecodeError with python API

2015-03-29 Thread Sebastian Fischmeister
Hi, I'm trying to use the python API for notmuch, and get the following error: --- Traceback (most recent call last): File ./test.py, line 66, in module print(type(y.get_part(1))) File /usr/lib/python3.4/site-packages/notmuch/message.py, line 602, in get_part parts =

Re: UnicodeDecodeError with python API

2015-03-29 Thread W. Trevor King
On Sun, Mar 29, 2015 at 09:08:28AM -0400, Sebastian Fischmeister wrote: Traceback (most recent call last): File ./test.py, line 66, in module print(type(y.get_part(1))) … File /usr/lib/python3.4/email/parser.py, line 54, in parse data = fp.read(8192) File

Re: UnicodeDecodeError with python API

2015-03-29 Thread Sebastian Fischmeister
My first guess is that the file's encoding doesn't match your locale. Do you have a non-ASCII locale set? You can check with: It seems to be more tricky than I thought. I didn't have a locale set. When I set one, I can parse some emails with this: export LANG=en_US.latin-1 Others with this: