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

Name or service not known #3

Open
WouterEekhout opened this issue Mar 2, 2018 · 1 comment
Open

Name or service not known #3

WouterEekhout opened this issue Mar 2, 2018 · 1 comment

Comments

@WouterEekhout
Copy link

When executing your code I get an error.

I execute the following code:

        from OpenKVK import ApiClient

        client = ApiClient()
        client.get_by_city('Rotterdam')

Which Results in the following error:

Traceback (most recent call last):
  File "/kvk/contacts/tests.py", line 11, in test_get_by_dossier
    client.get_by_city('Rotterdam')
  File "/kvk/venv/lib/python3.6/site-packages/OpenKVK/Client.py", line 291, in get_by_city
    return self.do_query(basequery,limit,**kwargs)
  File "/kvk/venv/lib/python3.6/site-packages/OpenKVK/Client.py", line 219, in do_query
    response = self.request(query_buffer[q])
  File "/kvk/venv/lib/python3.6/site-packages/OpenKVK/Client.py", line 73, in request
    request = urlopen(url)
  File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.6/urllib/request.py", line 1346, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib64/python3.6/urllib/request.py", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

Can anyone help me to resolve this error?

@richardbrinkman
Copy link

I get the same error. It seems that this module is using some outdated API. In Client.py I find a BASE_URL which points to http://api.openkvk.nl. This URL does not exist at all.
I did find another API with a similar name: https://api.overheid.io/openkvk (found at https://overheid.io/documentatie/openkvk). There is also an https://openkvk.nl address which does not work at the moment because their SSL certificate expired 2 days ago.

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