0

I am able to use twill to log in to a normal HTTP site. However, when I try and log into an SSL site, I get the following error:

$ twill-sh

>> go http://www.google.com
==> at http://www.google.com

>> go http://itunesconnect.apple.com/WebObjects/iTunesConnect.woa

ERROR: No module named mechanize

current page:  *empty page* 

What is the reason I am getting this error, which I think has to do with the security of the itunes page? And how would I log into the given page via command-line?

David542
  • 104,438
  • 178
  • 489
  • 842
  • I'm not familiar with this tool, but it looks like Twill uses [Mechanize](http://wwwsearch.sourceforge.net/mechanize/). You should be able to install this using Python's usual [easy_install](http://pypi.python.org/pypi/setuptools) mechanism. – johnsyweb Jan 08 '12 at 08:37
  • twill uses its own mechanize and some other packages. And for that it adds them to sys.path. The problem is related to this surely, but this does not yet give clues. – Roman Susi Jan 08 '12 at 10:08
  • Twill package documentation mentions problems with mechanize in its doc/problems.html (at the very end, as of version 0.9). – Roman Susi Jan 08 '12 at 10:10

1 Answers1

2

I believe, python-mechanize (Ubuntu name for it, may vary for other systems) and maybe some other dependencies are somehow not installed (or removed) on your system. While twill distro provides its own mechanize, distros usually make sure to do it right.

Before resorting to sudo easy_install, consider finding and installing packages by using your distro's way.

On Ubuntu:

sudo apt-get install python-mechanize
Roman Susi
  • 4,135
  • 2
  • 32
  • 47