improve error message when importing pandas from source directory#9626
improve error message when importing pandas from source directory#9626jreback merged 1 commit intopandas-dev:masterfrom
Conversation
There was a problem hiding this comment.
hmm, is it necessary to print the exception? I assume the interpreter will just quit in any event, not sure why was done that way previously. any thoughts?
There was a problem hiding this comment.
if you mean the part about finding out which module causes the ImportError, yes it's not really necessary. But I suppose it was done to make the error message even more specific, i.e. "can't import hashtable, you need to build C extensions" vs "you need to build C extensions"
both would be much better than the current error that says "can't import hashtable" http://stackoverflow.com/questions/14422976/importing-pandas-shows-importerror-cannot-import-name-hashtable
|
looks ok to me. @shoyer @jorisvandenbossche @cpcloud |
|
Indeed, looks good to me |
improve error message when importing pandas from source directory
|
@mortada thanks! |
Currently if one imports from the source directory without building the C extension the error message is not very helpful:
ImportError: cannot import name 'hashtable'I see a few previous PRs (#3827, #3821) that tried to address this but somehow this is still the behavior on
master.With this PR the error message would be a lot more informative: