diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index e474aeab1f6ca..7d66e1b4e1364 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -555,6 +555,8 @@ def open(self, mode='a', **kwargs): """ tables = _tables() + path_or_buf = _stringify_path(path_or_buf) + if self._mode != mode: # if we are changing a write mode to read, ok