-
Notifications
You must be signed in to change notification settings - Fork 21
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
Error: "user_token "+self.token_auth TypeError: can only concatenate str (not "tuple") to str #32
Comments
Hello, Same error on Python 2.7.5, with the last version 0.4.0 (GLPI 9.4.3). Is this still maintained? |
Same problem here with python 2.7.15 with the last version 0.4.0 . |
3.7, same error. |
Mistake is in the utiliszation of GLPI constructor : glpi = GLPI(url, token, (user, password)) (README) def __init__(self, url, app_token, auth_token,
item_map=None): (glpi/glpi.py) GLPI constructor does not take a tuple of user and password as argument but an authentification token. |
Thank you, all the while I thought my code was the issue. |
When I try to run the installation guide examples, such as listing tickets, this error appears:
"user_token "+self.token_auth
Traceback (most recent call last):
File "C:/Users/warde/PycharmProjects/pyGLPI/connection.py", line 13, in
glpi.get_all('ticket')
File "c:\users\warde\pycharmprojects\pyglpi\venv\src\glpi\glpi\glpi.py", line 589, in get_all
self.init_api()
File "c:\users\warde\pycharmprojects\pyglpi\venv\src\glpi\glpi\glpi.py", line 544, in init_api
self.api_session = self.api_rest.get_session_token()
File "c:\users\warde\pycharmprojects\pyglpi\venv\src\glpi\glpi\glpi.py", line 271, in get_session_token
self.set_session_token()
File "c:\users\warde\pycharmprojects\pyglpi\venv\src\glpi\glpi\glpi.py", line 211, in set_session_token
headers["Authorization"] = "user_token "+self.token_auth
TypeError: can only concatenate str (not "tuple") to str
I use python version 3.7
The text was updated successfully, but these errors were encountered: