Skip to content

Error: "user_token "+self.token_auth TypeError: can only concatenate str (not "tuple") to str #32

@wtccosta

Description

@wtccosta

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions