We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[note: I hit this on 0.8.4, but I suspect it affects earlier versions as well.]
Creating a dummy Memory object (using cachedir=None) isn't as transparent as it could be. Trying to clear the cache causes a TypeError:
cachedir=None
TypeError
In [1]: import joblib In [2]: M = joblib.Memory(cachedir=None) In [3]: M.clear() WARNING:root:[Memory(cachedir=None)]: Flushing completely the cache --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-3-f5283b9ae328> in <module>() ----> 1 M.clear() /usr/local/lib/python2.7/dist-packages/joblib/memory.pyc in clear(self, warn) 880 if warn: 881 self.warn('Flushing completely the cache') --> 882 rm_subdirs(self.cachedir) 883 884 def eval(self, func, *args, **kwargs): /usr/local/lib/python2.7/dist-packages/joblib/disk.pyc in rm_subdirs(path, onerror) 81 names = [] 82 try: ---> 83 names = os.listdir(path) 84 except os.error as err: 85 if onerror is not None: TypeError: coercing to Unicode: need string or buffer, NoneType found
I would expect clear() on a dummy Memory object to be a silent no-op, so this seems like a bug.
clear()
The text was updated successfully, but these errors were encountered:
Confirmed, seems like a bug indeed.
Sorry, something went wrong.
f6e197e
TST add test for Memory.clear when cachedir is None
8f53d55
See #200.
No branches or pull requests
[note: I hit this on 0.8.4, but I suspect it affects earlier versions as well.]
Creating a dummy Memory object (using
cachedir=None
) isn't as transparent as it could be. Trying to clear the cache causes aTypeError
:I would expect
clear()
on a dummy Memory object to be a silent no-op, so this seems like a bug.The text was updated successfully, but these errors were encountered: