Internal Server error

zaheer.agadi at zaheer.agadi at
Sun Feb 8 05:38:33 EST 2009

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
    conn = httplib.HTTPSConnection("",8181);
    conn.debuglevel  = 1
    username = "userone"
    password = "aaaa"
    Auth = "Basic" + ecnodeURL(self,username, password)
    url= "" +
username + "/attributes/atrone"
    print url
    headers = {"Authorization": Auth,"Accept": "application/json"}
    conn.request("GET", url,{},headers)
    response = conn.getresponse()
    data =
    print response.reason
    print response.

What I am getting as response
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
DeprecationWarning: the sha module is deprecated; use the hashlib
module instead
  import sha
send: 'GET
HTTP/1.1\r\nHost: /\r\nAccept-Encoding: identity\r
\nAccept: application/json\r\nAuthorization: BasicU3RvcmFnZUVncjA1OA==
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://"><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-
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
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