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

unsupported operand get_keys() #66

Closed
chadwcarlson opened this issue Apr 21, 2020 · 2 comments
Closed

unsupported operand get_keys() #66

chadwcarlson opened this issue Apr 21, 2020 · 2 comments

Comments

@chadwcarlson
Copy link

chadwcarlson commented Apr 21, 2020

Alright, this was working perfectly fine before, but is breaking on the same request.

python: 3.7
meilisearch: 0.10.0
meilisearch-python: 0.10.0

self.host = "http://127.0.0.1:7700"
...
client = meilisearch.Client(self.host, os.environ['MEILI_MASTER_KEY'])
config["public_api_key"]=client.get_keys()["public"]
Traceback (most recent call last):
  File "main.py", line 112, in <module>
    xss.update()
  File "main.py", line 63, in update
    config["public_api_key"]=client.get_keys()
  File "/Users/chadcarlson/.local/share/virtualenvs/search-DGRxVg4v/lib/python3.7/site-packages/meilisearch/key.py", line 37, in get_keys
    return HttpRequests.get(self.config, self.key_path)
  File "/Users/chadcarlson/.local/share/virtualenvs/search-DGRxVg4v/lib/python3.7/site-packages/meilisearch/_httprequests.py", line 8, in get
    config.url + '/' + path,
TypeError: unsupported operand type(s) for +: 'method' and 'str'

What am I missing here? Much appreciated.

C

@chadwcarlson
Copy link
Author

False alarm. I was passing it a function that returned the host definition, and that was the problem.

@curquiza
Copy link
Member

Hey @chadwcarlson!
Good to know that you solved the issue 🙂
Don't hesitate if you have any other question, you're issue was detailed, we really appreciate that!
Also, you can join us in our Slack to ask your questions 😉

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