--- imread/_imread.cpp.orig 2014-01-02 11:53:27.000000000 +0400 +++ imread/_imread.cpp 2014-01-02 12:09:13.000000000 +0400 @@ -47,8 +47,12 @@ return PyString_AsString(stro); #else if (!PyUnicode_Check(stro)) return 0; +#if (PY_VERSION_HEX < 0x03030000) + return PyBytes_AsString(PyUnicode_AsUTF8String(stro)); +#else return PyUnicode_AsUTF8(stro); #endif +#endif }