It worked few hours before but doesn’t work anymore… Any clues? Downgraded fastcore
to 1.3.1 and it works (pip install fastcore==1.3.1
). It is the only thing that seems to have changed in the recent past (22 hours back).
Ran the following in a jupyter notebook.
from fastai.vision.all import *
Error
TypeError Traceback (most recent call last)
<ipython-input-8-a1486c4587cf> in <module>
1 #hide
----> 2 from fastai.vision.all import *
3 from fastbook import *
4
5 matplotlib.rc('image', cmap='Greys')
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastai/vision/all.py in <module>
1 from . import models
2 from ..basics import *
----> 3 from ..callback.all import *
4 from .augment import *
5 from .core import *
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastai/callback/all.py in <module>
3 from .fp16 import *
4 from .hook import *
----> 5 from .mixup import *
6 from .progress import *
7 from .schedule import *
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastai/callback/mixup.py in <module>
6 from ..basics import *
7 from .progress import *
----> 8 from ..vision.core import *
9 from ..vision.models.xresnet import *
10
/opt/conda/envs/fastai/lib/python3.8/site-packages/fastai/vision/core.py in <module>
23 if not hasattr(Image,'_patched'):
24 _old_sz = Image.Image.size.fget
---> 25 @patch(as_prop=True)
26 def size(x:Image.Image): return fastuple(_old_sz(x))
27 Image._patched = True
TypeError: patch() got an unexpected keyword argument 'as_prop'