[twill] problems with form filling works in 0.8.3 but not in 0.8.4a10
Norman Khine
nkhine at itaapy.com
Wed Mar 22 01:36:06 PST 2006
Titus Brown wrote:
>p.s. sorry 'bout that... <sigh> Stephen added in a unit test to catch
>exactly this problem, too!
>
>On Tue, Mar 21, 2006 at 05:54:25PM +0000, Norman Khine wrote:
>-> hi,
>-> i just upgraded to a new version, but got the following error when i try
>-> to check a checkbox which is executed from a python script, and i get
>-> the following traceback:
>->
>-> Form #2
>-> ## __Name__________________ __Type___ __ID________ __Value__________________
>-> ids:list checkbox (None) [] of ['bookings', 'class', 'module1 ...
>-> 1 ;remove submit (None) Remove
>-> 2 ;rename_form submit (None) Rename..
>-> 3 ;copy submit (None) Copy
>-> 4 ;cut submit (None) Cut
>-> 5 ;translate_form submit (None) Translate..
>-> Traceback (most recent call last):
>-> File "twill_test.py", line 79, in ?
>-> fv('2', 'ids:list', "module_test")
>-> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twill-0.8.4a10-py2.4.egg/twill/commands.py", line 406, in formvalue
>-> set_form_control_value(control, value)
>-> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twill-0.8.4a10-py2.4.egg/twill/utils.py", line 146, in set_form_control_value
>-> checkbox = control.get(name='True')
>-> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twill-0.8.4a10-py2.4.egg/twill/other_packages/ClientForm.py", line 1672, in get
>-> return disambiguate(items, nr, name=name, label=label, id=id)
>-> File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/twill-0.8.4a10-py2.4.egg/twill/other_packages/ClientForm.py", line 1484, in disambiguate
>-> raise ItemNotFoundError(msg)
>-> ClientForm.ItemNotFoundError: id=None name='True' label=None
>->
>->
>-> but the same code works on 0.8.3 without any problems
>->
>-> here is my python
>->
>-> link = b.find_link(compile('module_test/;browse_thumbnails'))
>-> if link:
>-> if link.url == 'module_test/;browse_thumbnails':
>-> follow(';browse_list')
>-> b.showforms()
>-> fv('2', 'ids:list', "module_test")
>-> b.submit(';remove')
>-> com('[info] Old module_test removed')
>->
>->
>-> any idea as to why.
>->
>-> 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
>->
>->
>-> _______________________________________________
>-> twill mailing list
>-> twill at lists.idyll.org
>-> http://lists.idyll.org/listinfo/twill
>->
>->
>
>
hi titus,
ok updated to twill-0.8.4a13, but now i have a different traceback error
"""raise AmbiguityError(msg)""" ;)
##############
Form #2
## ## __Name__________________ __Type___ __ID________
__Value__________________
1 ids:list checkbox (None) [] of ['bookings',
'class', 'module1 ...
2 1 ;remove submit (None) Remove
3 2 ;rename_form submit (None) Rename..
4 3 ;copy submit (None) Copy
5 4 ;cut submit (None) Cut
6 5 ;translate_form submit (None) Translate..
Traceback (most recent call last):
File "twill_test.py", line 79, in ?
fv('2', 'ids:list', "module_test")
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 158, in set_form_control_value
checkbox = control.get()
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 1672, in get
return disambiguate(items, nr, name=name, label=label, id=id)
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 1487, in disambiguate
raise AmbiguityError(msg)
ClientForm.AmbiguityError: id=None name=None label=None
--
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