deep-learning-with-pytorch / dlwpt-code

Code for the book Deep Learning with PyTorch by Eli Stevens, Luca Antiga, and Thomas Viehmann.

Home Page:https://www.manning.com/books/deep-learning-with-pytorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: cannot import name 'BytesType' from 'diskcache.core'

sandip1604 opened this issue · comments

Hello Everyone

I am trying to learn along with the book by building cancer detection along with the book. However I get the following error.
Traceback (most recent call last):

File "/home/sandip/code/dsets.py", line 16, in
from util.disk import getCache

File "/home/sandip/code/util/disk.py", line 4, in
from diskcache.core import BytesType, MODE_BINARY, BytesIO

ImportError: cannot import name 'BytesType' from 'diskcache.core' (/home/sandip/anaconda3/envs/breast_cancer/lib/python3.7/site-packages/diskcache/core.py)

image

Please guide me to fix the issue.

Thanks in advance

commented

same issue here!!

commented

@sandip1604
install diskcache version 4.1.0., Current version of diskcache does not have BytesType included.
Use pip install "diskcache==4.1.0" instead of pip install diskcache, which installs the current version