diff -r 1fed50c8ea62 Modules/_elementtree.c --- a/Modules/_elementtree.c Tue Nov 26 10:46:06 2013 +0100 +++ b/Modules/_elementtree.c Wed Nov 27 23:17:01 2013 +0100 @@ -3038,7 +3038,10 @@ if (PyErr_Occurred()) return; - suri = PyUnicode_DecodeUTF8(uri, strlen(uri), "strict"); + if (uri) + suri = PyUnicode_DecodeUTF8(uri, strlen(uri), "strict"); + else + sprefix = PyUnicode_FromString(""); if (!suri) return;