[redland-dev] unicode issue on os x with python bindings

Christopher Schmidt crschmidt at crschmidt.net
Wed May 11 21:31:05 BST 2005


On Wed, May 11, 2005 at 10:19:58PM +0200, Suzan Foster wrote:
> I'm hitting an error on my mac with a python script which I'm not 
> seeing when running with windows. It's also my first attempt at python, 
> which doesn't help :-| Anybody who can steer me in the right direction?
> 
> http://www.ipodder.org/aboutTheDirectory threw an exception.
>   librdf_new_uri() argument 2 must be string without null bytes, not str

Not sure exactly what "http://www.ipodder.org/aboutTheDirectory" is
supposed to be: if you could give a copy of the code snippet which is
causing the proglem, it might help me.

However, when I've run into this issue in the past, it has been as a
result of trying to pass in a <type 'unicode'> string rather than a
<type 'string'> string. You may want to check your code and run a str()
around anything that might be of type "unicode": you can test this by
using the function type(variable), and you can cast it by using
str(variable).

-- 
Christopher Schmidt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.gnomehack.com/pipermail/redland-dev/attachments/20050511/19d3c2ec/attachment.pgp


More information about the redland-dev mailing list