question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

address "'http:" not found: [Errno 11001] getaddrinfo failed.

See original GitHub issue

When I try the sample code of scrapy tutorial in Creating a project, Extracting data,after type

scrapy shell 'http://quotes.toscrape.com/page/1/'

I got a exception like

twisted.internet.error.DNSLookupError: DNS lookup failed: address "'http:" not found: [Errno 11001] getaddrinfo failed.

and my operating system is windows with python 2.7

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
kmikecommented, Oct 14, 2016

@redapple it seems quoting rules are different in cmd.exe (http://stackoverflow.com/questions/24173825/what-does-single-quote-do-in-windows-batch-files) - only double quotes are supported. It means that on Linux and OS X the right way is to use single quotes, and on Windows the right way is to use double quotes. My vote is to add a note about Windows and keep single quotes in examples.

1reaction
kmikecommented, Oct 19, 2016

@LancelotHolmes it works because there is nothing to escape in these URLs; these URLs work without quotes in linux as well. But in linux the example start to fail as soon as user changes URL to another URL, with GET arguments, because & has special meaning in shell. So we used quotes in tutorial to promote good practices.

It seems escaping in windows shell is more tricky; there is no equivalent for unix single quotes. According to http://ss64.com/nt/syntax-esc.html percent character still needs to be escaped, even if it is inside quotes. On the other hand, unlike bash, & char is not a problem under Windows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python scrapy shell exception: address "'http:" not found
getaddrinfo failed. and I have searched the stackoverflow and find a similar problem like question and one answer is try another terminal,and I...
Read more >
GetAddrInfo fails with error 11001 when there was a previous ...
Address an issue in which you receive a WSAHOST_NOT_FOUND error when the GetAddrInfo is called after another call for the AF_INET6 family.
Read more >
Socket error #11001: Host not found - Remote Utilities
Cause. This error means that the remote Host or Agent is unavailable due to one of these reasons: DNS problem, i.e. the IP...
Read more >
gaierror Errno 11003 getaddrinfo failed | Edureka Community
I am trying to send one email using smtp server, but I am getting this below error.
Read more >
URLError: <urlopen error [Errno 11001] getaddrinfo failed>
Python 3.6.5 is being used to test whether url is live or not. Can anyone shed light on this? Regards, David.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found