Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error running concept net file. #5

Open
rndn123 opened this issue Oct 31, 2020 · 1 comment
Open

error running concept net file. #5

rndn123 opened this issue Oct 31, 2020 · 1 comment

Comments

@rndn123
Copy link

rndn123 commented Oct 31, 2020

hello @t-li when I run conceptnet.ipynb file with my own dataset. I got this error. can you please help if possible. thanks in advance.

processing ['Sanchi', 'gets', 'its', 'name', 'from', 'the', 'Pali', 'word', 'sanch', 'which', 'means', 'to', 'measure', '.', 'Known', 'as']
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/urllib/request.py", line 1325, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib/python3.6/http/client.py", line 1281, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1327, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1276, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1042, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 980, in send
self.connect()
File "/usr/lib/python3.6/http/client.py", line 952, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
OSError: [Errno 99] Cannot assign requested address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "conceptnet.py", line 296, in worker
rs = cn.antonym(l)
File "conceptnet.py", line 108, in antonym
combined = self.antonym_from(concept, verbose) + self.antonym_to(concept, verbose)
File "conceptnet.py", line 90, in antonym_from
data = open_url(url_to_search)
File "conceptnet.py", line 17, in open_url
return urlopen(url)
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 1353, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.6/urllib/request.py", line 1327, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 99] Cannot assign requested address>
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "conceptnet.py", line 381, in
sys.exit(main(sys.argv[1:]))
File "conceptnet.py", line 377, in main
process(opt)
File "conceptnet.py", line 346, in process
results = pool.map(worker, params)
File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
urllib.error.URLError: <urlopen error [Errno 99] Cannot assign requested address>

@t-li
Copy link
Member

t-li commented Oct 31, 2020

Hey it seems a query error. Do you happen to have a local ConceptNet instance running. What is the url used to make the query? Can you print it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants