Skip to content

TypeError: Can't convert 'bytes' object to str implicitly #11

@jukebox

Description

@jukebox
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/glpi/glpi.py", line 221, in set_session_token
    err = _glpi_html_parser(r.content)
  File "/usr/local/lib/python3.5/dist-packages/glpi/glpi.py", line 100, in _glpi_html_parser
    html_parser = GlpiHTMLParser(content)
  File "/usr/local/lib/python3.5/dist-packages/glpi/glpi.py", line 76, in __init__
    self.feed(content)
  File "/usr/lib/python3.5/html/parser.py", line 110, in feed
    self.rawdata = self.rawdata + data
TypeError: Can't convert 'bytes' object to str implicitly

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "testgplisdk.py", line 4, in <module>
    g.get_all('ticket')
  File "/usr/local/lib/python3.5/dist-packages/glpi/glpi.py", line 517, in get_all
    self.init_api()
  File "/usr/local/lib/python3.5/dist-packages/glpi/glpi.py", line 481, in init_api
    self.api_session = self.api_rest.get_session_token()
  File "/usr/local/lib/python3.5/dist-packages/glpi/glpi.py", line 236, in get_session_token
    self.set_session_token()
  File "/usr/local/lib/python3.5/dist-packages/glpi/glpi.py", line 224, in set_session_token
    err = _glpi_html_parser(r.content)
  File "/usr/local/lib/python3.5/dist-packages/glpi/glpi.py", line 100, in _glpi_html_parser
    html_parser = GlpiHTMLParser(content)
  File "/usr/local/lib/python3.5/dist-packages/glpi/glpi.py", line 76, in __init__
    self.feed(content)
  File "/usr/lib/python3.5/html/parser.py", line 110, in feed
    self.rawdata = self.rawdata + data
TypeError: Can't convert 'bytes' object to str implicitly

`

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