sightmachine / SimpleCV

The Open Source Framework for Machine Vision
http://simplecv.org
BSD 3-Clause "New" or "Revised" License
2.68k stars 798 forks source link

Image constructor doesn't accept unicode filenames #666

Open jferguson-gnubio opened 9 years ago

jferguson-gnubio commented 9 years ago

The test I'm seeing, currently in ImageClass.py line 1038 is

type(source) == type(str())

Couldn't or shouldn't it be:

isinstance(source, basestring)

?

Perhaps there are pitfalls to this? but I was passing unicode pathnames (as a result of other code paths giving me the pathname), which is a reasonable thing to do, and getting an Image object with no data in it, with no exceptions raised or anything. Took me a long time to find out what was going on...