Hi Titus,

I am attaching with this e-mail, the pickle files created using 'scotch' for twill (twill11.pickle) and browser (browser11.pickle). I am also attaching the files with request/response traffic traced while running the twill script (twilltraffic.txt) and browsing (browser-traffic.txt) for the purpose of uploading the file.

Please let me know if these files would help you trace the error I am getting while using the twill script to perform file upload functionality.

Best regards.
Swati






----- Original Message ----- From: "Titus Brown" <[EMAIL PROTECTED]>
To: "Swati Bendale" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Tuesday, July 18, 2006 2:24 AM
Subject: Re: [twill] Problem with file upload using formfile


-> Sorry for delay in reply. As I was busy automating other stuff which had
-> higher priority, I could not send you the twill traffic recording and the
-> browser traffic recording.
->
-> I followed the procedure as mentioned by you on Windows. I downloaded the
-> wsgirwef package. But it seems there is some problem running the
-> run-recording-proxy.py.
-> 1) If I do not provide the option values on the command prompt, I get an -> empty twill-traffic.pickle file even after browsing to the application with
-> upload functionality (here  I edited the run-recording-proxy.py file at
-> line no.18 and 20 to change the default host and port number).
->
-> 2) When I provide the option values at command prompt I get error. I am
-> attaching the error lines I get while running the run-recording-proxy.py
-> with this e-mail.
->
-> Please direct me as to what to do next or please let me know any additional
-> steps to be followed on Windows to get the run-recording-proxy.py file
-> running successfully.

Hi, Swati,

it sounds like you're not actually hitting the proxy.  Are you sure you
have the proxy settings set correctly?

If you stop run-recording-proxy.py and try to browse, your browser
should complain that the proxy isn't running.  Then, after restarting
run-recording-proxy, you should see proxy output for each URL request
that goes through.

cheers,
--titus

Attachment: twill-traffic.pickle
Description: Binary data

Attachment: browser-traffic.pickle
Description: Binary data

REQUEST ==> http://<hostname>/tfs-internal/admin/newsite.jsp

++ RESPONSE: 200 OK
++ (7272 bytes of content returned)
++ (response is text/html;charset=utf-8)
(# 6)
REQUEST ==> http://<hostname>/tfs-internal/admin/upload.jsp
(post form)
        providerName:  "sppartner"
        roles:  "1"
        protocol:  "urn:liberty:iff:2003-08"
        action:  "Next"
        g:  "group:default"

++ RESPONSE: 200 OK
++ (7018 bytes of content returned)
++ (response is text/html;charset=utf-8)
(# 7)
Traceback (most recent call last):
 File "C:\PYTHON~2\SCOTCH~1\bin\wsgiref\handlers.py", line 93, in run
   self.finish_response()
 File "C:\PYTHON~2\SCOTCH~1\bin\wsgiref\handlers.py", line 133, in finish_res
nse
   for data in self.result:
 File "C:\PYTHON~2\SCOTCH~1\scotch\recorder.py", line 239, in __call__
   if utils.display_record(record):
 File "C:\PYTHON~2\SCOTCH~1\scotch\utils.py", line 104, in display_record
   if not f(record):
 File "C:\PYTHON~2\SCOTCH~1\scotch\utils.py", line 61, in filter_only_primary
ages
   return filter_not_redirect_unless_submit(record) and \
 File "C:\PYTHON~2\SCOTCH~1\scotch\utils.py", line 38, in filter_no_images
   if content_type.startswith('image/'):
AttributeError: 'NoneType' object has no attribute 'startswith'
REQUEST ==> http://<hostname>/tfs-internal/admin/viewsite.jsp
(query string)
        p: ['http://<sitename>/tfs']

++ RESPONSE: 200 OK
++ (7143 bytes of content returned)
++ (response is text/html;charset=utf-8)
(# 9)



REQUEST ==> http://<hostname>/tfs-internal/admin/index.jsp

++ RESPONSE: 200 OK
++ (25303 bytes of content returned)
++ (response is text/html;charset=utf-8)
(# 98)
REQUEST ==> http://<hostname>/tfs-internal/admin/newsite.jsp

++ RESPONSE: 200 OK
++ (7272 bytes of content returned)
++ (response is text/html;charset=utf-8)
(# 99)
REQUEST ==> http://<hostname>/tfs-internal/admin/upload.jsp
(post form)
        providerName:  "sppartner.gs-lab.com"
        roles:  "1"
        protocol:  "urn:liberty:iff:2003-08"
        action:  "Next"
        g:  "group:default"

++ RESPONSE: 200 OK
++ (7029 bytes of content returned)
++ (response is text/html;charset=utf-8)
(# 100)
REQUEST ==> http://<hostname>/tfs-internal/admin/AdminUploadMetaDat
a
(post form)
        rurl:Traceback (most recent call last):
 File "C:\PYTHON~2\SCOTCH~1\bin\wsgiref\handlers.py", line 93, in run
   self.finish_response()
 File "C:\PYTHON~2\SCOTCH~1\bin\wsgiref\handlers.py", line 133, in finish_respo
nse
   for data in self.result:
 File "C:\PYTHON~2\SCOTCH~1\scotch\recorder.py", line 239, in __call__
   if utils.display_record(record):
 File "C:\PYTHON~2\SCOTCH~1\scotch\utils.py", line 126, in display_record
   _display_post_data(record.inp, environ)
 File "C:\PYTHON~2\SCOTCH~1\scotch\utils.py", line 84, in _display_post_data
   value_list = [ i.value for i in value_list ]
 File "C:\Pythontest\lib\cgi.py", line 536, in __iter__
   return iter(self.keys())
 File "C:\Pythontest\lib\cgi.py", line 601, in keys
   raise TypeError, "not indexable"
TypeError: not indexable
_______________________________________________
twill mailing list
[email protected]
http://lists.idyll.org/listinfo/twill

Reply via email to