problem no. 24

+2 sumit poonia · February 5, 2016
Traceback (most recent call last):
  File "C:/Users/hp 8.1/PycharmProjects/untitled2/sumit", line 1, in <module>
    from urllib2 import request
ImportError: cannot import name request

this is my error ,i still  trying to fix this but cannot find exact way

Post a Reply

Replies

Oldest  Newest  Rating
0 sfolje 0 · February 5, 2016
If you are trying out no.24 tutorial, it is for python3. I recommend you to make sure you are using python3.

Because I am 100% (based on error) sure that you are running this code using python 2.x.x instead of pyhton 3.x.x.

Next, to solve problem in python2 (not recommended) :

Take a look :

request vs. Request

Notice any difference?
You got it


from urllib2 import Request
  • 1

Python

107,344 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator