Reverted, re-opened and re-assigned to you. Actually can't see what's wrong in backtrace. And that's not about why windows allows to pass None instead of String, that's about why PyUnicode_EncodeFSDefault causes issues on Windows when called with non-string argument.
On Mon, Jun 18, 2012 at 6:50 PM, Campbell Barton <[email protected]>wrote: > On my system I get: > > Traceback (most recent call last): > File "<blender_console>", line 1, in <module> > TypeError: BlendDataMovieClips.load(): error with keyword argument > "filepath" - Function.filepath expected a string type, not NoneType > > Could you revert this, Id rather find why windows allows None to be > accepted as a string (thats really crappy and would probably give bugs > elsewhere if its true) > > On Mon, Jun 18, 2012 at 2:34 PM, Sergey Sharybin <[email protected]> > wrote: > > Revision: 48030 > > > http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48030 > > Author: nazgul > > Date: 2012-06-18 12:34:19 +0000 (Mon, 18 Jun 2012) > > Log Message: > > ----------- > > Fix #31856: movieclips.load(filepath=None) or value crash Blender > > > > Disallow running PyUnicode_EncodeFSDefault for None type which seems > > to be an issue on Windows. > > > > Modified Paths: > > -------------- > > trunk/blender/source/blender/python/generic/py_capi_utils.c > > > > Modified: trunk/blender/source/blender/python/generic/py_capi_utils.c > > =================================================================== > > --- trunk/blender/source/blender/python/generic/py_capi_utils.c > 2012-06-18 12:29:44 UTC (rev 48029) > > +++ trunk/blender/source/blender/python/generic/py_capi_utils.c > 2012-06-18 12:34:19 UTC (rev 48030) > > @@ -384,7 +384,10 @@ > > else { > > PyErr_Clear(); > > > > - if (PyBytes_Check(py_str)) { > > + if (py_str == Py_None) { > > + return NULL; > > + } > > + else if (PyBytes_Check(py_str)) { > > return PyBytes_AS_STRING(py_str); > > } > > else if ((*coerce = PyUnicode_EncodeFSDefault(py_str))) { > > > > _______________________________________________ > > Bf-blender-cvs mailing list > > [email protected] > > http://lists.blender.org/mailman/listinfo/bf-blender-cvs > > > > -- > - Campbell > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > -- With best regards, Sergey Sharybin _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
