Skip to content

Give a more informative error message if cache directory can not be created #972

Description

@PGijsbers

If your configuration specifies a cache directory which can not be created, the following error is raised:

(jupyter3) me-2:datanb me$ python
Python 3.6.5 (default, Apr 25 2018, 14:23:58)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import openml
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/me/venv/jupyter3/lib/python3.6/site-packages/openml/__init__.py", line 20, in <module>
    from . import _api_calls
  File "/Users/me/venv/jupyter3/lib/python3.6/site-packages/openml/_api_calls.py", line 10, in <module>
    from . import config
  File "/Users/me/venv/jupyter3/lib/python3.6/site-packages/openml/config.py", line 295, in <module>
    _setup()
  File "/Users/me/venv/jupyter3/lib/python3.6/site-packages/openml/config.py", line 203, in _setup
    os.mkdir(cache_directory)
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/gj/cm0k4b_s42j30zs376cq_5hh0000gn/T//RtmpFJlUoh/cache'

It would be better to have a more informative error message that indicates the cache directory can not be created and where to find the config file to change the cache directory.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions