Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

"ImportError: No module named request" error #7

Open
caofangkun opened this issue Jan 19, 2018 · 2 comments
Open

"ImportError: No module named request" error #7

caofangkun opened this issue Jan 19, 2018 · 2 comments

Comments

@caofangkun
Copy link

urllib.request modules have been deprecated,
urllib.request.urlretrieve should be urllib.urlretrieve

➜  face-generation git:(master) python --version 
Python 2.7.14 :: Anaconda custom (64-bit)

➜  face-generation git:(master) jupyter notebook dlnd_face_generation.ipynb

image

  File "helper.py", line 215
    self.image_mode)
SyntaxError: only named arguments may follow *expression

@caofangkun
Copy link
Author

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-2fe1a6e71a9d> in <module>()
      8 DON'T MODIFY ANYTHING IN THIS CELL
      9 """
---> 10 import helper
     11 
     12 helper.download_extract('mnist', data_dir)

/home/ablecao/workspace/cn-deep-learning/face-generation/helper.py in <module>()
      2 import os
      3 import hashlib
----> 4 from urllib.request import urlretrieve
      5 import zipfile
      6 import gzip

ImportError: No module named request

image

caofangkun pushed a commit to caofangkun/cn-deep-learning that referenced this issue Jan 19, 2018
caofangkun pushed a commit to caofangkun/cn-deep-learning that referenced this issue Jan 19, 2018
…est.urlretrieve' should be 'urllib.urlretrieve'
@caofangkun
Copy link
Author

Python 3.* should use:
from unittest import mock

Python 2.* use:
from mock import mock

caofangkun pushed a commit to caofangkun/cn-deep-learning that referenced this issue Jan 19, 2018
', Python 2.* use:
'from mock import mock

'
caofangkun pushed a commit to caofangkun/cn-deep-learning that referenced this issue Jan 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant