And, of course, being trigger happy:),
I left out the attachments in the previous mail,
now attached to this mail.
Sorry/stava
Lars Stavholm wrote:
> Titus Brown wrote:
>> On Tue, Sep 19, 2006 at 08:04:55PM +0100, John J Lee wrote:
>> -> [...]
>> -> > (um, what the above paragraph means is: always use mechanize.Blah, not
>> -> > urllib2.Blah :-)
>> -> [...]
>> ->
>> -> Just noticed this, also from mechanize page, but says it more clearly:
>> ->
>> ->
>> -> mechanize exports the complete interface of urllib2:
>> ->
>> -> import mechanize
>> -> response = mechanize.urlopen("http://www.example.com/")
>> -> print response.read()
>> ->
>> -> so anything you would normally import from urllib2 can (and should, by
>> -> preference, to insulate you from future changes) be imported from
>> -> mechanize instead. In many cases if you import an object from mechanize
>> it
>> -> will be the very same object you would get if you imported from urllib2.
>> -> In many other cases, though, the implementation comes from mechanize,
>> -> either because bug fixes have been applied or the functionality of
>> urllib2
>> -> has been extended in some way.
>>
>> OK, I've swapped out all references to urllib2.
>>
>> Stava, if you download
>>
>> http://darcs.idyll.org/~t/projects/twill-latest.tar.gz
>>
>> the auth stuff now uses mechanize's auth handling. It's still two
>> months behind John's latest mechanize (because I still have some custom
>> stuff that hasn't been integrated into mechanize) but it might work.
>
> OK, I did, sorry to say: things took a turn for the worst: more errors.
>
> I've attached two log files, one using stock twill-0.8.5,
> and the other using twill-latest:
>
> o twill-0.8.5: the login error we started out with.
> o twill-latest: a good few more link errors in addition
> to the login failing.
>
> At the beginning of each log you'll have the twill input I'm using.
> You're welcome to try it out yourself. <http://www.linadd.org> is
> a public site with low traffic. I've added user "test" with password
> "moretest" that I use for these tests.
>
> R/stava
Script started on ons 20 sep 2006 10.09.02
% cat linadd.org.twill
add_auth "Linux Addons" http://www.linadd.org test moretest
go http://www.linadd.org
extend_with check_links
check_links www\.linadd\.org
% twill-sh linadd.org.twill
>> EXECUTING FILE linadd.org.twill
Added auth info: realm 'Linux Addons' / URI 'http://www.linadd.org' / user 'test'
==> at http://www.linadd.org
Imported extension module 'check_links'.
(at /usr/lib/python2.4/site-packages/twill/extensions/check_links.pyc)
Gathered URL http://www.linadd.org -- matched regexp
Gathered URL http://www.linadd.org/login -- matched regexp
Gathered URL http://www.linadd.org/settings -- matched regexp
Gathered URL http://www.linadd.org/wiki/TracGuide -- matched regexp
Gathered URL http://www.linadd.org/about -- matched regexp
Gathered URL http://www.linadd.org/wiki -- matched regexp
Gathered URL http://www.linadd.org/timeline -- matched regexp
Gathered URL http://www.linadd.org/roadmap -- matched regexp
Gathered URL http://www.linadd.org/browser -- matched regexp
Gathered URL http://www.linadd.org/report -- matched regexp
Gathered URL http://www.linadd.org/newticket -- matched regexp
Gathered URL http://www.linadd.org/search -- matched regexp
Gathered URL http://www.linadd.org/tags -- matched regexp
Gathered URL http://www.linadd.org/downloads -- matched regexp
Gathered URL http://www.linadd.org/build -- matched regexp
Gathered URL http://www.linadd.org/screenshots -- matched regexp
Gathered URL http://www.linadd.org/wiki -- matched regexp
Gathered URL http://www.linadd.org/wiki/TitleIndex -- matched regexp
Gathered URL http://www.linadd.org/wiki/RecentChanges -- matched regexp
Gathered URL http://www.linadd.org/wiki/WikiStart?action=history -- matched regexp
Gathered URL http://www.linadd.org/wiki -- matched regexp
Gathered URL http://www.linadd.org/wiki/LinuxNews -- matched regexp
Gathered URL http://www.linadd.org/wiki/RpmIntro -- matched regexp
Gathered URL http://www.linadd.org/wiki/DocMgr -- matched regexp
Gathered URL http://www.linadd.org/wiki/DocMgr -- matched regexp
Gathered URL http://www.linadd.org/wiki/DocMgr -- matched regexp
Gathered URL http://www.linadd.org/wiki/Joomla -- matched regexp
Gathered URL http://www.linadd.org/wiki/Joomla -- matched regexp
Gathered URL http://www.linadd.org/wiki/Joomla -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/downloads -- matched regexp
Gathered URL http://www.linadd.org/wiki/2006/09/19/19.28 -- matched regexp
Gathered URL http://www.linadd.org/wiki/2006/09/19/17.49 -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/2006/09/12/18.01 -- matched regexp
Gathered URL http://www.linadd.org/wiki/2006/09/12/18.01 -- matched regexp
Gathered URL http://www.linadd.org/downloads -- matched regexp
Gathered URL http://www.linadd.org/wiki/RpmIntro -- matched regexp
Gathered URL http://www.linadd.org/newticket -- matched regexp
Gathered URL http://www.linadd.org/wiki/LinuxNews -- matched regexp
Gathered URL http://www.linadd.org/changeset/1591 -- matched regexp
Gathered URL http://www.linadd.org/changeset/1590 -- matched regexp
Gathered URL http://www.linadd.org/changeset/1589 -- matched regexp
Gathered URL http://www.linadd.org/wiki/DocMgr -- matched regexp
Gathered URL http://www.linadd.org/wiki/Joomla -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/screenshots -- matched regexp
Gathered URL http://www.linadd.org/wiki/WikiStart?format=txt -- matched regexp
Gathered URL http://www.linadd.org/about -- matched regexp
Trying http://www.linadd.org/settings ==> at http://www.linadd.org/settings
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/WikiStart?action=history ==> at http://www.linadd.org/wiki/WikiStart?action=history
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/timeline ==> at http://www.linadd.org/timeline
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/WikiStart?format=txt ==> at http://www.linadd.org/wiki/WikiStart?format=txt
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/login ==> at http://www.linadd.org/login
...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/Trac ==> at http://www.linadd.org/wiki/Trac
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/tags ==> at http://www.linadd.org/tags
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/browser ==> at http://www.linadd.org/browser
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org ==> at http://www.linadd.org
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/2006/09/12/18.01 ==> at http://www.linadd.org/wiki/2006/09/12/18.01
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/screenshots ==> at http://www.linadd.org/screenshots
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/roadmap ==> at http://www.linadd.org/roadmap
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/TracGuide ==> at http://www.linadd.org/wiki/TracGuide
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/build ==> at http://www.linadd.org/build
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/changeset/1589 ==> at http://www.linadd.org/changeset/1589
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/about ==> at http://www.linadd.org/about
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/Joomla ==> at http://www.linadd.org/wiki/Joomla
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/Misc ==> at http://www.linadd.org/wiki/Misc
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/RecentChanges ==> at http://www.linadd.org/wiki/RecentChanges
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/TitleIndex ==> at http://www.linadd.org/wiki/TitleIndex
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/newticket ==> at http://www.linadd.org/newticket
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/RpmIntro ==> at http://www.linadd.org/wiki/RpmIntro
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/changeset/1590 ==> at http://www.linadd.org/changeset/1590
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/2006/09/19/17.49 ==> at http://www.linadd.org/wiki/2006/09/19/17.49
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki ==> at http://www.linadd.org/wiki
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/downloads ==> at http://www.linadd.org/downloads
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/DocMgr ==> at http://www.linadd.org/wiki/DocMgr
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/LinuxNews ==> at http://www.linadd.org/wiki/LinuxNews
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/Webmin ==> at http://www.linadd.org/wiki/Webmin
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/search ==> at http://www.linadd.org/search
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/report ==> at http://www.linadd.org/report
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/changeset/1591 ==> at http://www.linadd.org/changeset/1591
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/2006/09/19/19.28 ==> at http://www.linadd.org/wiki/2006/09/19/19.28
...success!
==> back to http://www.linadd.org
Could not follow 1 links
http://www.linadd.org/login
Oops! Twill assertion error on line 4 of 'linadd.org.twill' while executing
>> check_links www\.linadd\.org
broken links on page
** UNHANDLED EXCEPTION: broken links on page
--
0 of 1 files SUCCEEDED.
Failed:
linadd.org.twill
% exit
Script done on ons 20 sep 2006 10.09.33
Script started on ons 20 sep 2006 10.11.57
% cat linadd.org.twill
add_auth "Linux Addons" http://www.linadd.org test moretest
go http://www.linadd.org
extend_with check_links
check_links www\.linadd\.org
% twill-sh linadd.org.twill
>> EXECUTING FILE linadd.org.twill
Added auth info: realm 'Linux Addons' / URI 'http://www.linadd.org' / user 'test'
==> at http://www.linadd.org
Imported extension module 'check_links'.
(at /usr/lib/python2.4/site-packages/twill/extensions/check_links.pyc)
Gathered URL http://www.linadd.org -- matched regexp
Gathered URL http://www.linadd.org/login -- matched regexp
Gathered URL http://www.linadd.org/settings -- matched regexp
Gathered URL http://www.linadd.org/wiki/TracGuide -- matched regexp
Gathered URL http://www.linadd.org/about -- matched regexp
Gathered URL http://www.linadd.org/wiki -- matched regexp
Gathered URL http://www.linadd.org/timeline -- matched regexp
Gathered URL http://www.linadd.org/roadmap -- matched regexp
Gathered URL http://www.linadd.org/browser -- matched regexp
Gathered URL http://www.linadd.org/report -- matched regexp
Gathered URL http://www.linadd.org/newticket -- matched regexp
Gathered URL http://www.linadd.org/search -- matched regexp
Gathered URL http://www.linadd.org/tags -- matched regexp
Gathered URL http://www.linadd.org/downloads -- matched regexp
Gathered URL http://www.linadd.org/build -- matched regexp
Gathered URL http://www.linadd.org/screenshots -- matched regexp
Gathered URL http://www.linadd.org/wiki -- matched regexp
Gathered URL http://www.linadd.org/wiki/TitleIndex -- matched regexp
Gathered URL http://www.linadd.org/wiki/RecentChanges -- matched regexp
Gathered URL http://www.linadd.org/wiki/WikiStart?action=history -- matched regexp
Gathered URL http://www.linadd.org/wiki -- matched regexp
Gathered URL http://www.linadd.org/wiki/LinuxNews -- matched regexp
Gathered URL http://www.linadd.org/wiki/RpmIntro -- matched regexp
Gathered URL http://www.linadd.org/wiki/DocMgr -- matched regexp
Gathered URL http://www.linadd.org/wiki/DocMgr -- matched regexp
Gathered URL http://www.linadd.org/wiki/DocMgr -- matched regexp
Gathered URL http://www.linadd.org/wiki/Joomla -- matched regexp
Gathered URL http://www.linadd.org/wiki/Joomla -- matched regexp
Gathered URL http://www.linadd.org/wiki/Joomla -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/downloads -- matched regexp
Gathered URL http://www.linadd.org/wiki/2006/09/19/19.28 -- matched regexp
Gathered URL http://www.linadd.org/wiki/2006/09/19/17.49 -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/wiki/2006/09/12/18.01 -- matched regexp
Gathered URL http://www.linadd.org/wiki/2006/09/12/18.01 -- matched regexp
Gathered URL http://www.linadd.org/downloads -- matched regexp
Gathered URL http://www.linadd.org/wiki/RpmIntro -- matched regexp
Gathered URL http://www.linadd.org/newticket -- matched regexp
Gathered URL http://www.linadd.org/wiki/LinuxNews -- matched regexp
Gathered URL http://www.linadd.org/changeset/1591 -- matched regexp
Gathered URL http://www.linadd.org/changeset/1590 -- matched regexp
Gathered URL http://www.linadd.org/changeset/1589 -- matched regexp
Gathered URL http://www.linadd.org/wiki/DocMgr -- matched regexp
Gathered URL http://www.linadd.org/wiki/Joomla -- matched regexp
Gathered URL http://www.linadd.org/wiki/Trac -- matched regexp
Gathered URL http://www.linadd.org/wiki/Webmin -- matched regexp
Gathered URL http://www.linadd.org/wiki/Misc -- matched regexp
Gathered URL http://www.linadd.org/screenshots -- matched regexp
Gathered URL http://www.linadd.org/wiki/WikiStart?format=txt -- matched regexp
Gathered URL http://www.linadd.org/about -- matched regexp
Trying http://www.linadd.org/settings ==> at http://www.linadd.org/settings
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/WikiStart?action=history ==> at http://www.linadd.org/wiki/WikiStart?action=history
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/timeline ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/WikiStart?format=txt ==> at http://www.linadd.org/wiki/WikiStart?format=txt
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/login ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/Trac ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/tags ==> at http://www.linadd.org/tags
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/browser ==> at http://www.linadd.org/browser
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org ==> at http://www.linadd.org
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/2006/09/12/18.01 ==> at http://www.linadd.org/wiki/2006/09/12/18.01
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/screenshots ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/roadmap ==> at http://www.linadd.org/roadmap
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/TracGuide ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/build ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/changeset/1589 ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/about ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/Joomla ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/Misc ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/RecentChanges ==> at http://www.linadd.org/wiki/RecentChanges
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/TitleIndex ==> at http://www.linadd.org/wiki/TitleIndex
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/newticket ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/RpmIntro ==> at http://www.linadd.org/wiki/RpmIntro
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/changeset/1590 ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/2006/09/19/17.49 ==> at http://www.linadd.org/wiki/2006/09/19/17.49
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki ==> at http://www.linadd.org/wiki
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/downloads ==> at http://www.linadd.org/downloads
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/DocMgr ==> at http://www.linadd.org/wiki/DocMgr
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/LinuxNews ==> at http://www.linadd.org/wiki/LinuxNews
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/Webmin ==> at http://www.linadd.org/wiki/Webmin
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/search ==> at http://www.linadd.org/search
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/report ==> at http://www.linadd.org/report
...success!
==> back to http://www.linadd.org
Trying http://www.linadd.org/changeset/1591 ...failure ;(
==> back to http://www.linadd.org
Trying http://www.linadd.org/wiki/2006/09/19/19.28 ==> at http://www.linadd.org/wiki/2006/09/19/19.28
...success!
==> back to http://www.linadd.org
Could not follow 13 links
http://www.linadd.org/timeline
http://www.linadd.org/login
http://www.linadd.org/wiki/Trac
http://www.linadd.org/screenshots
http://www.linadd.org/wiki/TracGuide
http://www.linadd.org/build
http://www.linadd.org/changeset/1589
http://www.linadd.org/about
http://www.linadd.org/wiki/Joomla
http://www.linadd.org/wiki/Misc
http://www.linadd.org/newticket
http://www.linadd.org/changeset/1590
http://www.linadd.org/changeset/1591
Oops! Twill assertion error on line 4 of 'linadd.org.twill' while executing
>> check_links www\.linadd\.org
broken links on page
** UNHANDLED EXCEPTION: broken links on page
--
0 of 1 files SUCCEEDED.
Failed:
linadd.org.twill
20.629u 1.324s 0:36.20 60.6% 0+0k 0+0io 0pf+0w
% exit
Script done on ons 20 sep 2006 10.12.50
_______________________________________________
twill mailing list
[email protected]
http://lists.idyll.org/listinfo/twill