list operations fail using Python binding with object of type 'NoneType' has no len()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-neutronclient |
Fix Released
|
Critical
|
Anand Shanmugam |
Bug Description
A recent change in python-
(test_venv2)
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from os import environ
>>> from neutronclient.
>>> nc = NeutronClient(
>>> nc.list_networks()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/
ret = self.function(
File "/home/
**_params)
File "/home/
for r in self._paginatio
File "/home/
res = self.get(path, params=params)
File "/home/
headers=
File "/home/
headers=
File "/home/
self.
File "/home/
uri_len = len(self.
TypeError: object of type 'NoneType' has no len()
>>>
(test_venv2)
python-
We have seen the problem with python-
But not with python-
Other similar list operations fail the same way.
Changed in python-neutronclient: | |
assignee: | nobody → Anand Shanmugam (anand1712) |
Changed in python-neutronclient: | |
importance: | Undecided → Critical |
milestone: | none → 2.3.12 |
Changed in python-neutronclient: | |
status: | Fix Committed → Fix Released |
Virtual environment where the only thing I change is the python- neutronclient :
(toto)cetest@ cer405n0046: ~/gavin$ python repro_neutron.py list_networks( ) cetest/ gavin/toto/ local/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 102, in with_params instance, *args, **kwargs) cetest/ gavin/toto/ local/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 568, in list_networks cetest/ gavin/toto/ local/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 315, in list n(collection, path, **params): cetest/ gavin/toto/ local/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 328, in _pagination cetest/ gavin/toto/ local/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 301, in get headers, params=params) cetest/ gavin/toto/ local/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 278, in retry_request headers, params=params) cetest/ gavin/toto/ local/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 201, in do_request _check_ uri_length( action) cetest/ gavin/toto/ local/lib/ python2. 7/site- packages/ neutronclient/ v2_0/client. py", line 188, in _check_uri_length httpclient. endpoint_ url) + len(action) cer405n0046: ~/gavin$ pip freeze | grep neutron neutronclient= =2.3.11. post24 cer405n0046: ~/gavin$ pip uninstall python- neutronclient neutronclient: cetest/ gavin/toto/ bin/neutron cetest/ gavin/toto/ lib/python2. 7/site- packages/ neutronclient cetest/ gavin/toto/ lib/python2. 7/site- packages/ python_ neutronclient- 2.3.11. post24- py2.7.egg- info neutronclient cer405n0046: ~/gavin$ pip install python- neutronclient unpacking python- neutronclient 10.22.157. 17/pypi/ latest/ python- neutronclient/ uses an insecure transport scheme (http). Consider using https if 10.22.157.17 has it available pypi.python. org/simple/ python- neutronclient/ uses an insecure transport scheme (http). Consider using https if pypi.python.org has it available neutronclient- 2.3.11- py2.py3- none-any. whl (199kB): 199kB downloaded lib/python2. 7/site- packages (from python- neutronclient) =2.2.0, !=2.4.0 in ./toto/ lib/python2. 7/site- packages (from python- neutronclient) lib/python2. 7/site- packages (from python- neutronclient) ion>=1. 2.0 in ./toto/ lib/python2. 7/site- packages (from python- neutronclient)
Traceback (most recent call last):
File "repro_neutron.py", line 13, in <module>
nc.
File "/home/
ret = self.function(
File "/home/
**_params)
File "/home/
for r in self._paginatio
File "/home/
res = self.get(path, params=params)
File "/home/
headers=
File "/home/
headers=
File "/home/
self.
File "/home/
uri_len = len(self.
TypeError: object of type 'NoneType' has no len()
(toto)cetest@
python-
(toto)cetest@
Uninstalling python-
/home/
/home/
/home/
Proceed (y/n)? y
Successfully uninstalled python-
(toto)cetest@
Downloading/
http://
http://
Downloading python_
Requirement already satisfied (use --upgrade to upgrade): iso8601>=0.1.9 in ./toto/
Requirement already satisfied (use --upgrade to upgrade): requests>
Requirement already satisfied (use --upgrade to upgrade): cliff>=1.7.0 in ./toto/
Requirement already satisfied (use --upgrade to upgrade): oslo.serializat
Requirement already satisfied (use --upgrade t...