3

クローラーを実行しています。MAC および Ubuntu システムで正常に動作しています。Windows で実行すると、次のスタック トレースが生成されます。

  File "build\bdist.win32\egg\mechanize\_mechanize.py", line 203, in open
    return self._mech_open(url, data, timeout=timeout)
  File "build\bdist.win32\egg\mechanize\_mechanize.py", line 230, in _mech_open
    response = UserAgentBase.open(self, request, data)
  File "build\bdist.win32\egg\mechanize\_opener.py", line 193, in open
    response = urlopen(self, req, data)
  File "build\bdist.win32\egg\mechanize\_urllib2_fork.py", line 344, in _open
    '_open', req)
  File "build\bdist.win32\egg\mechanize\_urllib2_fork.py", line 332, in _call_chain
    result = func(*args)
  File "build\bdist.win32\egg\mechanize\_urllib2_fork.py", line 1170, in https_open
    return self.do_open(conn_factory, req)
  File "build\bdist.win32\egg\mechanize\_urllib2_fork.py", line 1118, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
4

2 に答える 2

1

エラーから、接続しようとしているサーバーが接続を許可していないと推測します。

リクエストtelnetしている に接続できることを再確認するために使用してみてください。URL/IP:PORT

telnet <ip> <port>

PS:念のため、ポートをテストしていないため、接続を確認する ping を使用しないでください。

于 2016-04-06T10:53:27.537 に答える