Page MenuHomePhabricator

Usersearch: ERROR: Unhandled exception.[Errno socket error] [Errno -2] Name or service not known
Closed, ResolvedPublic

Event Timeline

valhallasw raised the priority of this task from to Needs Triage.
valhallasw updated the task description. (Show Details)
valhallasw added a project: Tools.
valhallasw added subscribers: valhallasw, afeder.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 28 2015, 4:14 PM
valhallasw updated the task description. (Show Details)Jun 28 2015, 4:16 PM
valhallasw set Security to None.
Traceback (most recent call last):
  File "/data/project/usersearch/public_html//usersearch.py", line 395, in <module>
    main()
  File "/data/project/usersearch/public_html//usersearch.py", line 125, in main
    namespaces = fetchnamespaces(domain)
  File "/data/project/usersearch/public_html//usersearch.py", line 338, in fetchnamespaces
    u = urllib.urlopen("http://" + domain + "/w/api.php?action=query&meta=siteinfo&siprop=namespaces|namespacealiases&format=xml")
  File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
    return opener.open(url)
  File "/usr/lib/python2.7/urllib.py", line 207, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 344, in open_http
    h.endheaders(data)
  File "/usr/lib/python2.7/httplib.py", line 962, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 822, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 784, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 765, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 553, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno -2] Name or service not known

the issue being that 'domain' contains 'https://en.wikipedia.org' instead of 'en.wikipedia.org'. Did the output of

SELECT url FROM meta_p.wiki WHERE dbname=%s;'

change?

CCing Toolforge as the meta_p table belongs there.

No, the [[ documentation || https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Database ]] clearly states the URL includes the protocol.

[18:47] <SigmaWP> The error has been noted and it will be fixed shortly, probably by 11:59 PM tomorrow at latest

Elee added a subscriber: Elee.Jun 28 2015, 4:53 PM

Issue has been fixed, and plans are underway to make the tool less horrible.

Issue has been fixed

So should this task be closed as resolved? Who is the assignee here?

Elee closed this task as Resolved.Jun 29 2015, 8:42 AM
Elee claimed this task.

@Aklapper er yeah sorry about that.