Re: URLError:

2022-02-12 Thread Gisle Vanem
Shaozhong SHI wrote: The following is used in a loop to get response code for each url. print (urllib.request.urlopen(url).getcode()) However, error message says: URLError: 11001 == WSAHOST_NOT_FOUND. Look in any 'winsock.h' header: #define WSAHOST_NOT_FOUND (WSABASEERR+1001) -- --gv

Re: URLError:

2022-02-12 Thread Chris Angelico
On Sun, 13 Feb 2022 at 07:17, Shaozhong SHI wrote: > > The following is used in a loop to get response code for each url. > > print (urllib.request.urlopen(url).getcode()) > > However, error message says: URLError: getaddrinfo failed> > > Python 3.6.5 is being used

Re: URLError:

2022-02-12 Thread Peter J. Holzer
On 2022-02-12 20:15:43 +, Shaozhong SHI wrote: > The following is used in a loop to get response code for each url. > > print (urllib.request.urlopen(url).getcode()) > > However, error message says: URLError: getaddrinfo failed> > > Python 3.6.5 is being used to

URLError:

2022-02-12 Thread Shaozhong SHI
The following is used in a loop to get response code for each url. print (urllib.request.urlopen(url).getcode()) However, error message says: URLError: Python 3.6.5 is being used to test whether url is live or not. Can anyone shed light on this? Regards, David -- https://mail.python.org

[issue16247] Report failing url in URLError?

2021-12-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: It is going to take a few weeks for me to get to my alerts, I will address this as soon as I get to it . Thanks for the triage, Irit. On Mon, Dec 13, 2021, 12:31 AM Irit Katriel wrote: > > Change by Irit Katriel : > > > -- > status: open ->

[issue16247] Report failing url in URLError?

2021-12-12 Thread Irit Katriel
Change by Irit Katriel : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16247] Report failing url in URLError?

2021-12-05 Thread Irit Katriel
Irit Katriel added the comment: Senthil, can this issue be closed now or is there something left to do? -- nosy: +iritkatriel ___ Python tracker ___

[issue36866] Certificate verification errors in urllib.request become URLError

2021-04-17 Thread Christian Heimes
Change by Christian Heimes : -- assignee: christian.heimes -> components: -SSL nosy: -christian.heimes versions: +Python 3.10 -Python 3.7 ___ Python tracker ___

[issue36866] Certificate verification errors in urllib.request become URLError

2019-05-11 Thread Christian Heimes
Christian Heimes added the comment: Update: 3.6 and earlier raised SSLError for untrusted or expired certs. Only hostname mismatch was not wrapped into URLError. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36866] Certificate verification errors in urllib.request become URLError

2019-05-11 Thread Christian Heimes
cateError >>> ssl.CertificateError.__mro__ (, , , , , , ) The new behavior is more consistent than the previous. Now all SSL handshake errors are wrapped in URLError. In 3.6 and earlier unsupported TLS version, cipher suite mismatch, and similar were wrapped in URLError. Certificate r

[issue36866] Certificate verification errors in urllib.request become URLError

2019-05-09 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36866] Certificate verification errors in urllib.request become URLError

2019-05-09 Thread Ned Deily
Change by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36866] Certificate verification errors in urllib.request become URLError

2019-05-09 Thread Matt Martz
ValueError. As such, as of Python3.7, ssl.SSLCertVerificationError is caught by the exception handling referenced above, as it is derived from OSError, and raised as a URLError, causing exception handling issues. You must now introspect e.reason to determine if the exception was caused due

[issue32586] urllib2 HOWTO URLError example minor error

2018-01-18 Thread MarmiteFox
MarmiteFox added the comment: Thanks for the fix and the tip about cross-checking in Python 3 - will remember that for the future. -- ___ Python tracker

[issue32586] urllib2 HOWTO URLError example minor error

2018-01-18 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32586] urllib2 HOWTO URLError example minor error

2018-01-18 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 8ca036d4716fc86ff42474ba35d3cd32f0188a15 by Mariatta (Pablo Galindo) in branch '2.7': bpo-32586: Fix code example in urllib2's doc (GH-5238)

[issue32586] urllib2 HOWTO URLError example minor error

2018-01-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Thanks for reporting this issue. Indeed, this is an error in the documentation. Notice that this is corrected in Python3 's version: https://docs.python.org/3.6/howto/urllib2.html#handling-exceptions I have prepared a Pull Request

[issue32586] urllib2 HOWTO URLError example minor error

2018-01-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +5084 stage: -> patch review ___ Python tracker ___

[issue32586] urllib2 HOWTO URLError example minor error

2018-01-17 Thread Tim Morris
New submission from Tim Morris <timo...@morrises.org.uk>: In the HOWTO for urllib2 for Python 2, in the Handling Exceptions section, it discusses the URLError exception being raised by urlopen() (https://docs.python.org/2/howto/urllib2.html#urlerror). The code snippet example for this

[issue19057] Sometimes urllib2 raises URLError when trying POST with httpS

2016-09-08 Thread Christian Heimes
Christian Heimes added the comment: I'm closing this ticket. It's old and hasn't seen any activity in almost three years. -- nosy: +christian.heimes resolution: -> not a bug status: open -> closed ___ Python tracker

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2016-06-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2d69d0419879 by Martin Panter in branch 'default': Issue #22797: Synchronize urlopen() doc string with RST documentation https://hg.python.org/cpython/rev/2d69d0419879 -- ___ Python tracker

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2016-06-03 Thread R. David Murray
R. David Murray added the comment: Thanks, Alexander. -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2016-06-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset b4df20312b78 by R David Murray in branch 'default': Clean up urlopen doc string. https://hg.python.org/cpython/rev/b4df20312b78 -- ___ Python tracker

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2016-06-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8b6b6add8e47 by R David Murray in branch 'default': psuedo merge: #22797: clarify when URLErrors are raised by urlopen. https://hg.python.org/cpython/rev/8b6b6add8e47 -- ___ Python tracker

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2016-06-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset aed4b9981fca by R David Murray in branch '3.5': #22797: clarify when URLErrors are raised by urlopen. https://hg.python.org/cpython/rev/aed4b9981fca New changeset d085b4f779af by R David Murray in branch '3.5': Merge: #22797: clarify when URLErrors

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2016-06-02 Thread Alexander Liu
Alexander Liu added the comment: Fixed the docs to specifically note that only protocol related errors raise the UrlError exception. -- nosy: +alex_thebear versions: +Python 3.6 -Python 3.4 Added file: http://bugs.python.org/file43131/urlopen_doc.patch

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2014-11-04 Thread Joshua Chin
New submission from Joshua Chin: The documentation for urlopen states that it Raises URLError on errors. However, urlopen can raise a ValueError. In fact, test_urllib. urlopen_FileTests.test_relativelocalfile specifically checks if urlopen raises a ValueError. I suggest removing

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2014-11-04 Thread R. David Murray
R. David Murray added the comment: This is a general principle in Python. A module may raise specific errors, but there are always other errors that may be raised. The wording could be clarified, but it should not be removed. -- nosy: +r.david.murray

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2014-11-04 Thread Joshua Chin
Changes by Joshua Chin joshuarc...@gmail.com: Added file: http://bugs.python.org/file37131/urlopen_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22797 ___

[issue22797] urllib.request.urlopen documentation falsely guarantees that a URLError will be raised on errors

2014-11-04 Thread R. David Murray
R. David Murray added the comment: (Looking at your new patch...thanks for giving it a try even though I wasn't clear). There are lots of other errors it can raise, too. I was thinking more along the lines of raises URLError on http protocol errors. The problem is that's not completely

[issue11220] Sometimes library raises URLError when trying POST with httpS

2013-09-20 Thread mrDoctorWho0 .
/python2.7/urllib2.py, line 1184, in do_open raise URLError(err) URLError: urlopen error _ssl.c:489: The handshake operation timed out -- components: +Library (Lib) -None nosy: +mrDoctorWho0.. title: https sslv3 error 14077417: illegal parameter - Sometimes library raises URLError when trying

[issue11220] Sometimes library raises URLError when trying POST with httpS

2013-09-20 Thread mrDoctorWho0 .
mrDoctorWho0 . added the comment: oops! wrong place! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11220 ___ ___ Python-bugs-list mailing list

[issue11220] Sometimes library raises URLError when trying POST with httpS

2013-09-20 Thread mrDoctorWho0 .
Changes by mrDoctorWho0 . mrdoctor...@gmail.com: Removed file: http://bugs.python.org/file31824/code.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11220 ___

[issue19057] Sometimes urllib2 raises URLError when trying POST with httpS

2013-09-20 Thread mrDoctorWho0 .
/python2.7/urllib2.py, line 1184, in do_open raise URLError(err) URLError: urlopen error _ssl.c:489: The handshake operation timed out This exception appears randomly, connection is ok 100%. I tried it on different machines with python 2.7.4 and 2.7.3. -- components: Library (Lib) files

[issue19057] Sometimes urllib2 raises URLError when trying POST with httpS

2013-09-20 Thread R. David Murray
R. David Murray added the comment: I would guess that if you did a network trace you'd find out there really was a packet that did not arrive (a timeout). Note that detecting this is complicated by the fact that ssl is involved. (I don't know the details, but I remember someone saying that

[issue16250] URLError invoked with reason as filename

2012-10-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5e71f2712076 by Senthil Kumaran in branch '3.2': Issue #16250: Fix URLError invocation with proper args. http://hg.python.org/cpython/rev/5e71f2712076 New changeset 30547e2cd04d by Senthil Kumaran in branch '3.3': Issue #16250: Fix URLError

[issue16250] URLError invoked with reason as filename

2012-10-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3fb84c1da8c5 by Senthil Kumaran in branch '2.7': Add some tests in 2.7 for Issue #16250 http://hg.python.org/cpython/rev/3fb84c1da8c5 -- ___ Python tracker rep...@bugs.python.org

[issue16250] URLError invoked with reason as filename

2012-10-27 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is fixed in all versions now. -- assignee: - orsenthil resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError

2012-10-27 Thread Senthil Kumaran
Senthil Kumaran added the comment: Buildbot issues are taken care. They are green for while. Tests have been backported 3.3 and 3.2 as well. 3.2 5e71f2712076 3.3 30547e2cd04d -- resolution: - fixed stage: - committed/rejected status: open - closed

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-27 Thread Senthil Kumaran
Senthil Kumaran added the comment: This has been backported. 3.2 5e71f2712076 3.3 30547e2cd04d -- assignee: - orsenthil resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-23 Thread Juho Vuori
Juho Vuori added the comment: Should the bug be closed as it seems to be fixed now? -- nosy: +juho ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10836 ___

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: Nope, I have backport it to other versions. I shall close it then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10836 ___

[issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError

2012-10-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 00e5e963b7d8 by Senthil Kumaran in branch 'default': Fix issue16300: addressing the buildbot failures on windows http://hg.python.org/cpython/rev/00e5e963b7d8 -- ___ Python tracker rep...@bugs.python.org

[issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError

2012-10-22 Thread Senthil Kumaran
either be consistent with other platforms and raise URLError or it could be for good reasons, the tests may need to be tweaked for windows. -- assignee: orsenthil keywords: easy messages: 173522 nosy: orsenthil priority: normal severity: normal status: open title: Windows raises ValueError

[issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError

2012-10-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: The problem is here: if url[:2] == '//' and url[2:3] != '/' and url[2:12].lower() != 'localhost/': raise ValueError(file:// scheme is supported only on localhost) On Unix like systems url[2:3] == '/', that is path starts with '/' and this ValueError is

[issue16300] Windows raises ValueError for file:///file/not/exists instead of URLError

2012-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 49de26395d1a by Senthil Kumaran in branch 'default': Issue #16301: Fix the localhost verification in urllib/request.py for file://. Modify tests to use localhost for local temp files, which could make Windows Buildbot (#16300) happy

[issue16250] URLError invoked with reason as filename

2012-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: This broke the Windows 7 buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/850 -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16250

[issue16250] URLError invoked with reason as filename

2012-10-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: The change in 49de26395d1a addresses the buildbot failure. I have given a run again. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16250 ___

[issue16250] URLError invoked with reason as filename

2012-10-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: The change I had made for fixing the windows buildbot had not fixed it. I am skipped (1f92315d9568) the test on windows, investigating the reason for windows behavior and I shall remove the skiptest on windows after fix. --

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: Here is the patch which captures both HTTPError and URLError at the open_file and thus preventing multiple exceptions to be raised ( URLError and next IOError). This can go in 3.4 and since this is bug, where correct exception is not being caught and wrong

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset daef5526d2ac by Senthil Kumaran in branch 'default': Issue #10836: Fix exception raised when file not found in urlretrieve http://hg.python.org/cpython/rev/daef5526d2ac -- nosy: +python-dev ___ Python

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: This one is fixed in 3.4. I can see the previous versions raised IOError exception and it is not a good idea to change by backporting. But the wrong arguments on URLError should be fixed tough. -- ___ Python

[issue16250] URLError invoked with reason as filename

2012-10-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: This patch fixed these URLError wrong invocation issue and adds some tests for testing those it. I noticed that some of these were in the dead-end of the code, like checking if url is not a str (it is always, unwrap makes it a str if otherwise). Those

[issue16247] Report failing url in URLError?

2012-10-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: The URLError changes gone in as part of fix for issue10836 should give e.filename and e.reason. -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16247

[issue16250] URLError invoked with reason as filename

2012-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8fb438e7f738 by Senthil Kumaran in branch 'default': Issue #16250: Fix the invocations of URLError which had misplaced filename attribute for exception http://hg.python.org/cpython/rev/8fb438e7f738 -- nosy: +python-dev

[issue16250] URLError invoked with reason as filename

2012-10-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is fixed in 3.4. I shall backport to other branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16250 ___

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-17 Thread Senthil Kumaran
Senthil Kumaran added the comment: @Ezio, regarding msg172988. That's embarrassing. It should be fixed soon. Review on the patch, how about having the strerror and filename from the exception? -raise URLError(e.errno, e.strerror, e.filename) +raise URLError(e.strerror

[issue16247] Report failing url in URLError?

2012-10-16 Thread Nick Coghlan
New submission from Nick Coghlan: Trying to streamline the URL retrieval example in the concurrent.futures docs were severely hampered by the fact the URLError thrown by urlopen doesn't tell you *what URL* it was trying to retrieve when it failed. This is OK in synchronous code (where you

[issue16247] Report failing url in URLError?

2012-10-16 Thread Ezio Melotti
Ezio Melotti added the comment: See also #10836 and msg172988. -- components: +Library (Lib) nosy: +ezio.melotti stage: - needs patch type: - behavior versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-16 Thread Chris Jerdonek
Chris Jerdonek added the comment: This should be reported in another issue though. Has this been done? -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10836 ___

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-16 Thread Ezio Melotti
Ezio Melotti added the comment: Nick reported #16247 today which is very similar. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10836 ___

[issue16250] URLError invoked with reason as filename

2012-10-16 Thread Chris Jerdonek
New submission from Chris Jerdonek: This issue is to fix invocations of URLError so that reasons are not passed in for the filename argument of the URLError constructor. Ezio found and described this issue when commenting on issue 10836: http://bugs.python.org/issue10836#msg172988 In more

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-16 Thread Chris Jerdonek
Chris Jerdonek added the comment: For tracking purposes, I created issue 16250 for what you observed above, which as you said is related to but not the same as Nick's issue 16247. -- ___ Python tracker rep...@bugs.python.org

[issue16250] URLError invoked with reason as filename

2012-10-16 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16250 ___ ___ Python-bugs-list

[issue16250] URLError invoked with reason as filename

2012-10-16 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16250 ___ ___ Python-bugs-list

[issue16250] URLError invoked with reason as filename

2012-10-16 Thread Chris Jerdonek
Chris Jerdonek added the comment: raise URLError('local file error: not on local host') I should also point out that URLError invocations with formats like the above already do occur in Lib/urllib/request.py. For example: raise URLError('ftp error: no host given') exc = URLError

[issue16250] URLError invoked with reason as filename

2012-10-16 Thread Chris Jerdonek
Chris Jerdonek added the comment: For future reference, this affects 3.2 onwards. It probably makes sense to address this in the same branches in which we plan to address issue 16247 (currently set to 3.3 onwards). -- stage: - needs patch versions: +Python 3.3

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-15 Thread Terry J. Reedy
') ... urllib.error.URLError: urlopen error [WinError 2] The system cannot find the file specified: 'missing' Nonetheless, this 3 arg call should be fixed 1887 except OSError as e: 1888 raise URLError(e.errno, e.strerror, e.filename) -- nosy: +terry.reedy title: regression: TypeError during exception

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-15 Thread Ezio Melotti
Ezio Melotti added the comment: While fixing this issue is easy, there is a wider problem with the use of URLError. The constructor accepts two args, reason and filename. About half of the errors in Lib/urllib/request.py use only one argument, and in the other half not a single one uses

[issue10836] urllib.request.urlretrieve calls URLError with 3 args

2012-10-15 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - patch review Added file: http://bugs.python.org/file27584/issue10836-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10836

[issue8580] Problem urllib2.URLError

2010-04-30 Thread Jorge Bosch
\urllib2.py, line 1121, in do_open raise URLError(err) urllib2.URLError: urlopen error [Errno 10061] No se puede establecer una conexión ya que el equipo de destino denegó expresamente dicha conexión -- messages: 104661 nosy: m_enanos priority: normal severity: normal status: open title

[issue8580] Problem urllib2.URLError

2010-04-30 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The bug tracker is for bugs in Python itself, and isn't a good place to look for help on getting an application program to work. You should try the python email list/newsgroup. (You can find links to the newsgroup and other resources

URLError errno and strerror not set

2009-07-16 Thread 1x7y2z9
python 2.5.2 errno, strerror and message do not appear to be set in the following two cases (at least). Is this to be expected? (as an aside, arg[0] is set) # case 1 print exception, exception.errno, exception.strerror, exception.message == '' urlopen error (111, 'Connection refused') None

Re: urllib2.URLError: urlopen error unknown url type: 'http error using twill with python

2009-06-29 Thread amadain
On Jun 8, 12:58 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Mon, 08 Jun 2009 12:14:18 +0100, Mark Devine wrote: Hi I wonder if someone could point me in the right direction. I used the following code to access gmail but I got a          urllib2.URLError: urlopen

urllib2.URLError: urlopen error unknown url type: 'http error using twill with python

2009-06-08 Thread Mark Devine
Hi I wonder if someone could point me in the right direction. I used the following code to access gmail but I got a urllib2.URLError: urlopen error unknown url type: 'http error when I ran it. I have included the Traceback import twill, string, os b=twill.commands.get_browser

Re: urllib2.URLError: urlopen error unknown url type: 'http error using twill with python

2009-06-08 Thread Steven D'Aprano
On Mon, 08 Jun 2009 12:14:18 +0100, Mark Devine wrote: Hi I wonder if someone could point me in the right direction. I used the following code to access gmail but I got a urllib2.URLError: urlopen error unknown url type: 'http error when I ran it. I have included the Traceback

Re: urllib2.URLError: urlopen error unknown url type: http

2009-03-13 Thread Coonay
i update via http proxy cmdset HTTP_PROXY=http://cache.mycompany.com:3128 cmdpython appcfg.py update myapp URLError: urlopen error [Errno 10061] No connection could be made because the t arget machine actively refused it Traceback (most recent call last): File C:\Program Files\Google

urllib2.URLError: urlopen error unknown url type: http

2009-03-11 Thread Coonay
\Python26\lib\urllib2.py, line 406, in _open 'unknown_open', req) File C:\PROGRA~1\Python26\lib\urllib2.py, line 361, in _call_chain result = func(*args) File C:\PROGRA~1\Python26\lib\urllib2.py, line 1163, in unknown_open raise URLError('unknown url type: %s' % type) urllib2

Re: urllib2.URLError: urlopen error unknown url type: http

2009-03-11 Thread Chris Rebert
, in unknown_open    raise URLError('unknown url type: %s' % type) urllib2.URLError: urlopen error unknown url type: http A. Please include the *entire* traceback, in the future B. Please include a snippet of the code you're using, in the future C. A bit less curt of a missive would also be appreciated

Re: URLError

2008-03-22 Thread Jim
on your example but the program still aborts and none of the code (Temporary failure, Skip/Halt/try Again? or Unknown response, boo hiss to you!) in your example is displayed. Try replacing the line: exceptURLError, e: with: except urllib2.URLError, e: and see if that helps

Re: URLError

2008-03-20 Thread Jim
= urllib2.urlopen(url).read() except URLError, e: if e.errno == 10053: # Software caused connection abort response = raw_input( Temporary failure, Skip/Halt/try Again?) response = response.lower().strip() if response in ('h', 'halt

Re: URLError

2008-03-20 Thread Steven D'Aprano
failure, Skip/Halt/try Again? or Unknown response, boo hiss to you!) in your example is displayed. Try replacing the line: except URLError, e: with: except urllib2.URLError, e: and see if that helps. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

URLError

2008-03-19 Thread Jim
, in http_open return self.do_open(httplib.HTTPConnection, req) File C:\Python25\lib\urllib2.py, line 1075, in do_open raise URLError(err) URLError: urlopen error (10053, 'Software caused connection abort') -- http://mail.python.org/mailman/listinfo/python-list

Re: URLError

2008-03-19 Thread Steven D'Aprano
anyone help with catching the abort before program aborts or provide code to automatically start program? Yes. Wrap the offending code with a try...except loop, something similar to this. try: contents = urllib2.urlopen(url).read() except URLError, e: if e.errno == 10053

Re: urlerror, urllib2: no address ... why or debug tips?

2006-03-10 Thread Rene Pijlman
[EMAIL PROTECTED]: Help please with a URLError. Post your code (a small self-contained example, preferrably) and the URL. -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

urlerror, urllib2: no address ... why or debug tips?

2006-03-09 Thread joemynz
Help please with a URLError. Invoking a url that works in Firefox and IE results in a urlerror 7, no address ... in python. I need to debug why. Traceback is below. There's a redirect when the url is invoked (it's part of a chain) - you can see it using liveheaders in firefox. What is the best