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

Exception when not setting an API key #101

Closed
m-kuhn opened this issue Apr 26, 2019 · 2 comments
Closed

Exception when not setting an API key #101

m-kuhn opened this issue Apr 26, 2019 · 2 comments
Assignees
Labels
enhancement fixed in master Download https://github.com/nilsnolde/OSMtools/archive/master.zip and extract to plugin path

Comments

@m-kuhn
Copy link
Contributor

m-kuhn commented Apr 26, 2019

The following error shows up when someone forgets to set the API key (which I assume is a common mistake for beginners ;) )

It would be nice to check if the API key is set and show a message (with a link where to get an API key) instead.

Traceback (most recent call last):
File "python/plugins/ORStools/proc/matrix_proc.py", line 240, in processAlgorithm
response = clnt.request(provider['endpoints'][self.ALGO_NAME], get_params, post_json=params)
File "python/plugins/ORStools/core/client.py", line 176, in request
blocking=True)
File "python/plugins/ORStools/core/networkaccessmanager.py", line 198, in request
req.setRawHeader(k.encode(), v.encode())
AttributeError: 'NoneType' object has no attribute 'encode'
@nilsnolde nilsnolde self-assigned this Apr 28, 2019
@nilsnolde
Copy link
Contributor

Yeah, that's true! Probably costing me quite a few stars on the repo;) I did that for the Pelias plugin, but apparently forgot to take it over to this one..

@nilsnolde nilsnolde added the fixed in master Download https://github.com/nilsnolde/OSMtools/archive/master.zip and extract to plugin path label May 2, 2019
@nilsnolde
Copy link
Contributor

uploaded in plugin repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fixed in master Download https://github.com/nilsnolde/OSMtools/archive/master.zip and extract to plugin path
Projects
None yet
Development

No branches or pull requests

2 participants