Skip to content

Can't find cache dir on Mac OSX #411

Closed

Description

@enzolutions

Similar to [#120] with an without relative paths

My config file have

cachedir = '/Users/enzo/.openml/cache/'
Traceback (most recent call last):
  File "script-1.py", line 1, in <module>
    import openml
  File "/Users/enzo/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/openml-0.6.0-py3.6.egg/openml/__init__.py", line 17, in <module>
    from . import config
  File "/Users/enzo/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/openml-0.6.0-py3.6.egg/openml/config.py", line 131, in <module>
    _setup()
  File "/Users/enzo/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/openml-0.6.0-py3.6.egg/openml/config.py", line 47, in _setup
    set_cache_directory(cache_dir)
  File "/Users/enzo/.pyenv/versions/miniconda3-4.3.30/lib/python3.6/site-packages/openml-0.6.0-py3.6.egg/openml/config.py", line 78, in set_cache_directory
    os.mkdir(dir_)
FileNotFoundError: [Errno 2] No such file or directory: "'/Users/enzo/.openml/cache/'"

Activity

  1. mfeurer commented on Mar 5, 2018

    @mfeurer
    Collaborator

    Could you please try if it work if you replace os.mkdir with os.makedirs?

  2. enzolutions commented on Mar 5, 2018

    @enzolutions
    Author

    I wasn't using anything in my code, to be able to use cache I have to add the following line in my script

    openml.config.set_cache_directory(os.path.expanduser('~/.openml/cache'))
    
  3. mfeurer commented on Mar 19, 2018

    @mfeurer
    Collaborator

    Thanks for reporting, this indeed seems to be a bug. We'll have a look into this.

  4. added this to the pip-release milestone on Mar 19, 2018
  5. self-assigned this
    on Mar 31, 2018
  6. mfeurer commented on Apr 13, 2018

    @mfeurer
    Collaborator

    We added the expanduser command and this should work now (on the development branch). Thanks again for reporting this issue.

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions