urllib2.HTTPError: HTTP Error 404: Not Found is being returned when i try to execute my Python 2.7 script the full traceback is located at https://pastebin.com/f7EzJ4zn how do i fix this?
site = "https://askubuntu.com"
file_path = site + "/https://askubuntu.com/questions/1156044/what-is-this-
error-typeerror-unsupported-operand-types-for-instance-and/1156049#1156049"
import urllib2
server = urllib2.urlopen(site)
response = urllib2.urlopen(file_path)
print(response.read())
Edit: The problem is solved now i copied the full URL when I needed Urllib2 HTTP 404
site = "https://askubuntu.com"
file_path = "https://askubuntu.com/questions/1156065/urllib2-http-404"
import urllib2
server = urllib2.urlopen(site)
response = urllib2.urlopen(file_path)
print(response.read())