[twill] AttributeError: value attribute is readonly - when uploading an image from fs

Norman Khine nkhine at itaapy.com
Thu Mar 23 04:00:42 PST 2006


Hello again,
I have a form that uploads an image file, but I get the following traceback:

Traceback (most recent call last):
  File "twill_test.py", line 113, in ?
    fv("upload_file", "file", "/Users/khinester/Pictures/Alon.jpg")
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twill-0.8.4a13-py2.4.egg/twill/commands.py",
line 408, in formvalue
    set_form_control_value(control, value)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twill-0.8.4a13-py2.4.egg/twill/utils.py",
line 207, in set_form_control_value
    control.value = val
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twill-0.8.4a13-py2.4.egg/twill/other_packages/ClientForm.py",
line 1230, in __setattr__
    raise AttributeError("%s attribute is readonly" % name)
AttributeError: value attribute is readonly

Is there a way to use twill to upload the image or file?

Cheers
Norman

-- 
Norman Khine
SARL ITAAPY 9 rue Darwin, 75018 Paris - Tel +33(0)1 42 23 67 45
Mail: nkhine at itaapy.com - Fax: 01 53 28 27 88




More information about the twill mailing list