Open davidliu1978 opened 6 years ago
Are you available to get some of the basic test scripts working with the automation software?
On Sep 29, 2018 1:14 PM, "Dan" notifications@github.com wrote:
Great work thank you I think I almost get it running except this error below.can someone help?
Traceback (most recent call last): File "campsites.py", line 133, in sites = findCampSites(arg_dict) File "campsites.py", line 67, in findCampSites content_raw = sendRequest(payload) File "campsites.py", line 118, in sendRequest "ERROR, %d code received from %s".format(resp.status_code, BASE_URL + SEARCH_PATH)) NameError: name 'SEARCH_PATH' is not defined
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bri-bri/yosemite-camping/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/ALYX3MM3ETeLXgqQh2a-7BOsyoX1n3m_ks5uf9S6gaJpZM4XAqxz .
'SEARCH_PATH' is not defined in the campsites.py file, which is causing the error. In addition to this, it seems like there's an issue with how "format" is being used in the exception. To clean this up and make the exception return properly, your line 118 could be changed to something like:
raise Exception("failedRequest","ERROR, %d code received from %s" % (resp.status_code, BASE_URL + UNIF_SEARCH))
However, the exception reporting isn't the biggest problem here. The problem is that the exception is being triggered at all. If you make the change noted above, you'll see that resp.status_code
is giving a 403 code instead of the desired 200. I believe this means that access is being forbidden by the server, maybe because the session spoofing that the script is set up to do is no longer working properly?
Getting the whole thing back up and working is a little beyond my knowledge, but if anybody has managed to do it, more help on this would be very much appreciated.
Does anyone have this working... kinda new to python so trying diff things
Great work thank you I think I almost get it running except this error below.can someone help?
Traceback (most recent call last): File "campsites.py", line 133, in
sites = findCampSites(arg_dict)
File "campsites.py", line 67, in findCampSites
content_raw = sendRequest(payload)
File "campsites.py", line 118, in sendRequest
"ERROR, %d code received from %s".format(resp.status_code, BASE_URL + SEARCH_PATH))
NameError: name 'SEARCH_PATH' is not defined