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

WordApi.getDefinitions and WordApi.getRelatedWords can raise urllib.error.HTTPError: HTTP Error 404: Not Found #8

Open
Harmon758 opened this issue Jul 29, 2020 · 1 comment

Comments

@Harmon758
Copy link

Harmon758 commented Jul 29, 2020

>>> from wordnik import swagger, WordApi
>>> client = swagger.ApiClient(API_KEY, "http://api.wordnik.com/v4")
>>> api = WordApi.WordApi(client)
>>> api.getRelatedWords("orange", relationshipTypes="rhyme")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python38\lib\site-packages\wordnik\WordApi.py", line 275, in getRelatedWords
    response = self.apiClient.callAPI(resourcePath, method, queryParams,
  File "C:\Program Files\Python38\lib\site-packages\wordnik\swagger.py", line 73, in callAPI
    request = urllib.request.urlopen(requestParams)
  File "C:\Program Files\Python38\lib\urllib\request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program Files\Python38\lib\urllib\request.py", line 531, in open
    response = meth(req, response)
  File "C:\Program Files\Python38\lib\urllib\request.py", line 640, in http_response
    response = self.parent.error(
  File "C:\Program Files\Python38\lib\urllib\request.py", line 569, in error
    return self._call_chain(*args)
  File "C:\Program Files\Python38\lib\urllib\request.py", line 502, in _call_chain
    result = func(*args)
  File "C:\Program Files\Python38\lib\urllib\request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

This can also occur with WordApi.getDefinitions and other relationship types such as synonym and antonym.

#7 is most likely referring to this issue as well.

@Harmon758 Harmon758 changed the title WordApi.getRelatedWords raises urllib.error.HTTPError: HTTP Error 404: Not Found WordApi.getDefinitions and WordApi.getRelatedWords can raise urllib.error.HTTPError: HTTP Error 404: Not Found Jul 29, 2020
@gabrielmajosi

This comment has been minimized.

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