Hope you all are doing great, I have a basic query about "How to get rid off this error urllib2.HTTPError: HTTP Error 404", what is this error is all about? I searched found that meaning the resource can't be found, Python internal error. I also searched some of the pages to match the actual error but seems its only showing "urllib2.HTTPError: HTTP Error 404:" nothing found anything like that.
Tried below, but no help. import requests requests.get(url)
What am doing is below:
import urllib2
import urlopen
import time
import sys
import re
JENKINS_BASE = "url"
JENKINS_JOB = "my jenkin job path/"
agents_list = []
start = 0 #
job_number = 'lastBuild' # Get the last build
cont = True # This semaphore will be used to indicate whether or not to read more data
while cont:
response = urllib2.urlopen(
'{base}/{job}/{job_number}'
'/logText/progressiveText?start={start}'.format(
base=JENKINS_BASE, job=JENKINS_JOB,
job_number=job_number, start=start
)
)
Expected, that I shouldn't get the error: urllib2.HTTPError: HTTP Error 404