python network access restriccion in ipod touch/iphone?

Discussion in 'Python' started by dvd, Nov 24, 2007.

  1. dvd

    dvd Guest

    Hi

    i have a python script that uses urllib2 to download one file, it runs
    ok in any pc but when urlopen is called in the ipod it show the
    following error:

    <urlopen error (4, 'Non-recoverable failure in name resolution')>

    The complete stack:

    >>> urllib2.urlopen("http://yahoo.com")

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.5/urllib2.py", line 121, in urlopen
    return _opener.open(url, data)
    File "/usr/lib/python2.5/urllib2.py", line 380, in open
    response = meth(req, response)
    File "/usr/lib/python2.5/urllib2.py", line 491, in http_response
    'http', request, response, code, msg, hdrs)
    File "/usr/lib/python2.5/urllib2.py", line 412, in error
    result = self._call_chain(*args)
    File "/usr/lib/python2.5/urllib2.py", line 353, in _call_chain
    result = func(*args)
    File "/usr/lib/python2.5/urllib2.py", line 575, in http_error_302
    return self.parent.open(new)
    File "/usr/lib/python2.5/urllib2.py", line 374, in open
    response = self._open(req, data)
    File "/usr/lib/python2.5/urllib2.py", line 392, in _open
    '_open', req)
    File "/usr/lib/python2.5/urllib2.py", line 353, in _call_chain
    result = func(*args)
    File "/usr/lib/python2.5/urllib2.py", line 1100, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File "/usr/lib/python2.5/urllib2.py", line 1075, in do_open
    raise URLError(err)
    urllib2.URLError: <urlopen error (4, 'Non-recoverable failure in name
    resolution')>

    this is the line where the error raises:

    urllib2.urlopen("http://yahoo.com")

    i can ping yahoo.com or google from ipod touch without problems, i
    even tried urlopen with IP from google and yahoo and the got the same
    result

    is there any walkaround for this problem?

    thanks in advance...
    dvd, Nov 24, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    459
  2. Marc Feeley
    Replies:
    0
    Views:
    382
    Marc Feeley
    May 19, 2011
  3. Han Holl
    Replies:
    4
    Views:
    337
    Nobuyoshi Nakada
    Oct 12, 2006
  4. Sergio Harem
    Replies:
    0
    Views:
    253
    Sergio Harem
    Jan 17, 2008
  5. Marc Feeley
    Replies:
    4
    Views:
    449
    andrew mcelroy
    May 23, 2011
Loading...

Share This Page