I am getting two errors everywhere that I think must be related to configuration. One is that open() does not accept PosixPaths but rather wants os.PathLike or strings; the other is that mkdir() does not accept an exist_ok flag. Neither makes any sense to me.
Minimal notebook to reproduce:
from fastai.text import *
CLAS_PATH=Path('data/imdb_clas/')
CLAS_PATH.mkdir(exist_ok=True)
# generates error:
# TypeError: mkdir() got an unexpected keyword argument 'exist_ok'
CLAS_PATH.mkdir()
# no error
# ok the directory is created, let's try opening a file
open(CLAS_PATH/'file.txt')
# generates error:
# TypeError: expected str, bytes or os.PathLike object, not PosixPath
open(str(CLAS_PATH/'file.txt'),'wb')
# no error
Here is some additional info on my system:
I am using an AWS P2.large instance for the course.
fwiw I get the same behavior when running python from a prompt in my ssh shell on the AWS machine.
(fastai) ubuntu@ip-10-0-0-10:$ python --version
Python 3.6.4 :: Anaconda, Inc.
Same answer in the notebook just to be sure:
import sys
sys.version
'3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19) \n[GCC 7.2.0]'