Skip to content

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

New issue

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

Closed
sandip1604 opened this issue Aug 28, 2020 · 2 comments
Closed

Comments

@sandip1604
Copy link

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

@emilearthur

This comment has been minimized.

@emilearthur
Copy link

emilearthur commented Aug 30, 2020

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants