Replies: 1 comment 1 reply
-
|
There is a Python variable named |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Structure
SOLR v. 9.8.0, 3 Nodes
Zookeeper v. 3.9.3, 3 Instances
Pysolr latest
The SOLR and Zookeeper Nodes run in a docker environment.
The Solr Authentication is a MultiAuthPlugin with the BasicAuthPlugin used to log in to the SOLR Admin UI and the JWTAuthPlugin used for the requests.
What I want
I need to send a request from my RestAPI to SOLR so I can search for content. For this I use pysolr.
The Problem
When I send the request with the token given as auth parameter I always get a "TypeError: 'str' object is not callable" error.
What I tried
I first tried my function without the authentication which works and returns my search results as expected. Then I tried with a static token which returns the error. And finally I tried the same with a always newly generated token which as well returns the error. Since I wasn't sure if the generated token works I printed the token in the console and tried to send a request with Postman with the given token which did work. When I use the "Basic Authentication" using a username and password it works as well.
What I expected
I expect, that the request is sent to SOLR. Then SOLR should check if the JWT token is valid with the settings set in the security.json and finally should return the search results.
Code
Error traceback
Beta Was this translation helpful? Give feedback.
All reactions