Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
if path is None:
# use an intelligent guess if it's not defined
def_path = op.realpath(op.join(op.dirname(__file__),
'..', '..', 'examples'))
#path = get_config(key, def_path)
# use the same for all datasets
if not os.path.exists(path):
except OSError:
raise OSError("User doesn't have write privilege to create a folder at %s.Consider providing a path as an input to sample.data_path(), where user has write privilege and %s data could be stored . "%(def_path,name))

This comment has been minimized.

Copy link

@dgwakeman dgwakeman commented Mar 18, 2014

I'm not really clear on the issues in the code, but it seems to me putting the code we have in an try except section and then having the exception just display a warning, which describes the problem and suggests a couple of alternatives, which the user must type in themselves


This comment has been minimized.

Copy link
Owner Author

@TanayGahlot TanayGahlot commented Mar 18, 2014

yes ,isnt that what you want?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment