Python2.7: TypeError: Cannot mix str and non-str arguments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-redfish |
New
|
Undecided
|
Unassigned |
Bug Description
Running python-redfish on Python2 is raising the following error as part of the connect() method: TypeError: Cannot mix str and non-str arguments.
It works fine on Python3.5 tho
LOG:
(venv) [fedora@localhost tmp]$ python
Python 2.7.13 (default, Jan 12 2017, 17:59:37)
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import redfish
>>> redfish.connect('http://
Initialize python-redfish
Certificat is not checked, this is insecure and can allow a man in the middle attack
Root url : http://
-------
Url: http://
Header: {u'Origin': 'http://
-------
Executing GET request:
URL: http://
headers: {u'Origin': 'http://
query: {}
data: None
GET: Headers: Host: localhost:8001
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: application/json
User-Agent: python-redfish
Origin: http://
OData-Version: 4.0
Content-type: application/json
127.0.0.1 - - [07/Feb/2017 02:46:39] "GET /redfish/v1 HTTP/1.1" 200 -
Got 200 OK:
{<email address hidden>': u'#ServiceRoot.
{ <email address hidden>': u'Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://
<email address hidden>': u'/redfish/
<email address hidden>': u'/redfish/v1/',
<email address hidden>': u'#ServiceRoot.
u'AccountSe
u'Chassis': { <email address hidden>': u'/redfish/
u'EventServ
u'Id': u'RootService',
u'Links': { u'Sessions': { <email address hidden>': u'/redfish/
u'Managers': { <email address hidden>': u'/redfish/
u'Name': u'Root Service',
u'Oem': { },
u'RedfishVe
u'SessionSe
u'Systems': { <email address hidden>': u'/redfish/
u'Tasks': { <email address hidden>': u'/redfish/
u'UUID': u'92384634-
API Version : 1.02
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/python-
verify_
File "/tmp/python-
mapping.
File "/tmp/python-
return urljoin(self.url, link)
File "/tmp/python-
base, url, _coerce_result = _coerce_args(base, url)
File "/tmp/python-
raise TypeError("Cannot mix str and non-str arguments")
TypeError: Cannot mix str and non-str arguments
>
Changed in python-redfish: | |
milestone: | none → 0.6 |
Hello Lucas,
First thanks for all the bug reports. I will try to look at them ASAP.
Can you please just let me know the simulator and python-redfish release you used.
This will probably help me to reproduce the bug.