Internal Server error

zaheer.agadi at gmail.com zaheer.agadi at gmail.com
Sun Feb 8 11:38:33 CET 2009


HI
I am getting an internal server error while trying get response from a
server following is my code


   def getDetails(self,username,password):
    urllib = urllib2.Request
    idurl="https://some.server.com/"
    port=8181
    conn = httplib.HTTPSConnection("some.server.com/",8181);
    conn.debuglevel  = 1
    username = "userone"
    password = "aaaa"
    Auth = "Basic" + ecnodeURL(self,username, password)
    url= "https://some.network.com:8181/main/folder/persons/" +
username + "/attributes/atrone"
    print url
    headers = {"Authorization": Auth,"Accept": "application/json"}
    conn.request("GET", url,{},headers)
    response = conn.getresponse()
    data = response.read()
    print response.reason
    print response.


What I am getting as response

https://some.server.com:8181/main/folder/persons/userone/attributes/atrone
C:\Python26\lib\site-packages\httplib2\__init__.py:29:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
C:\Python26\lib\site-packages\httplib2\__init__.py:44:
DeprecationWarning: the sha module is deprecated; use the hashlib
module instead
  import sha
send: 'GET https://some.server.com:8181/main/folder/persons/userone/attributes/atrone
HTTP/1.1\r\nHost: /some.server.com:8181\r\nAccept-Encoding: identity\r
\nAccept: application/json\r\nAuthorization: BasicU3RvcmFnZUVncjA1OA==
\r\n\r\n'
reply: 'HTTP/1.1 500 Internal Server Error\r\n'
header: Content-Type: text/html
header: Content-Language:
header: Content-Length: 1299
header: Date: Sun, 08 Feb 2009 10:25:52 GMT
header: Connection: close
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>Sun
Java System Application Server 9.1_02 - Error report</title><style
type="text/css"><!--H1 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-
family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-
family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;} P {font-family:Tahoma,Arial,sans-
serif;background:white;color:black;font-size:12px;}A {color : black;}
HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </
h1><hr/><p><b>type</b> Exception report</p><p><b>message</b></
p><p><b>description</b>The server encountered an internal error ()
that prevented it from fulfilling this request.</p><p><b>exception</b>
<pre>java.util.NoSuchElementException</pre></p><p><b>note</b> <u>The
full stack traces of the exception and its root causes are available
in the Sun Java System Application Server 9.1_02 logs.</u></p><hr/
><h3>Sun Java System Application Server 9.1_02</h3></body></html>
Internal Server Error
<httplib.HTTPResponse instance at 0x00B9CDA0>


Thanks alot



More information about the Python-list mailing list