Skip to content

Commit

Permalink
FIX error message on import from source directory (#276)
Browse files Browse the repository at this point in the history
This error occurs every time `formats` doesn't import from `cortex`. There can be other reasons for this than the stated one, for example that `formats.pyx` wasn't compiled correctly.
  • Loading branch information
eickenberg authored and TomDLT committed Jul 10, 2019
1 parent 25c1173 commit 2ca2c94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cortex/__init__.py
Expand Up @@ -12,7 +12,9 @@
try:
from cortex import formats
except ImportError:
raise ImportError("You are running pycortex from the source directory. Don't do that!")
raise ImportError("Either are running pycortex from the source directory, or the build is broken. "
"If your current working directory is 'cortex', where pycortex is installed, then change this. "
"If your current working directory is somewhere else, then you may have to rebuild pycortex.")

load = Dataset.from_file

Expand Down

0 comments on commit 2ca2c94

Please sign in to comment.