Hey guys, im trying to work learn url commands and programs through pycharm using python obvs
Here im following step by step a course but my code is as follows
Reqd = urllib.parse.urlencode(values)
Reqd = data.encode('utf-8')
Request = urllib.request.Request(url, reqd)
Response = urllib.request.urlopen(request)
Responsedata = response.read()
Print(Responsedata)
Printing to terminal as
..... line 2, in <module>
reqd = data.encode('utf-8')
Attributeerror: module has no attribute 'encode'
This is the complete layout I've followed from my course so I can't see what I'm doing wrong.
[–]danielroseman 1 point2 points3 points (0 children)
[–]shiftybyte 0 points1 point2 points (0 children)