<div dir="ltr">It's hard to debug that remotely.  If you add the requirements.txt file with the magnum-client to the code you submitted to gerrit, the tests will run on gerrit, and I can see the errors for myself.  The error message is pretty clearly saying that the module can't be found.  Not sure what to recommend here--maybe diff your changes with the one I pushed to gerrit for you to see what's different?<div><br></div><div>I think that putting the python-magnumclient into the /opt/stack/congress/requirements.tx file should work.  Then again, I don't see python-magnumclient in that long list of installed packages.</div><div><br></div><div>Tim</div><div> <br><br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 23, 2016 at 12:29 PM Ruben <<a href="mailto:r.manganiello1@studenti.unisa.it">r.manganiello1@studenti.unisa.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everybody,<br class="gmail_msg">
I've trying to run the unit test of the magnum_driver.<br class="gmail_msg">
<br class="gmail_msg">
I make:<br class="gmail_msg">
-cd /opt/stack/congress/<br class="gmail_msg">
-tox -epy27<br class="gmail_msg">
<br class="gmail_msg">
but I have error with the import.<br class="gmail_msg">
This is the output:<br class="gmail_msg">
<br class="gmail_msg">
"py27 develop-inst-noop: /opt/stack/congress<br class="gmail_msg">
py27 installed: alabaster==0.7.9,alembic==0.8.8,amqp==1.4.9,anyjson==0.3.3,appdirs==1.4.0,Babel==2.3.4,cachetools==2.0.0,cffi==1.9.1,cliff==2.2.0,cmd2==0.6.9,-e git+<a href="http://git.openstack.org/openstack/congress@b2d96b56f721c941e85db565d203df008c455b19#egg=congress,contextlib2==0.5.4,coverage==4.2,cryptography==1.5.3,debtcollector==1.9.0,decorator==4.0.10,docutils==0.12,dogpile.cache==0.6.2,enum34==1.1.6,eventlet==0.19.0,extras==1.0.0,fasteners==0.14.1,fixtures==3.0.0,flake8==2.2.4,funcsigs==1.0.2,functools32==3.2.3.post2,futures==3.0.5,futurist==0.19.0,greenlet==0.4.10,hacking==0.10.2,idna==2.1,ipaddress==1.0.17,iso8601==0.1.11,Jinja2==2.8,jsonpatch==1.14,jsonpointer==1.10,jsonschema==2.5.1,keystoneauth1==2.15.0,keystonemiddleware==4.10.0,kombu==3.0.37,linecache2==1.0.0,lxml==3.6.4,Mako==1.0.6,MarkupSafe==0.23,mccabe==0.2.1,mock==2.0.0,monotonic==1.2,mox3==0.18.0,msgpack-python==0.4.8,netaddr==0.7.18,netifaces==0.10.5,openstacksdk==0.9.9,os-client-config==1.22.0,osc-lib==1.2.0,oslo.concurrency==3.15.0,oslo.config==3.19.0,oslo.context==2.10.0,oslo.db==4.14.0,oslo.i18n==3.10.0,oslo.log==3.17.0,oslo.messaging==5.12.0,oslo.middleware==3.20.0,oslo.policy==1.16.0,oslo.serialization==2.14.0,oslo.service==1.17.0,oslo.utils==3.18.0,oslo.vmware==2.15.0,oslosphinx==4.8.0,oslotest==2.11.0,Paste==2.0.3,PasteDeploy==1.5.2,pbr==1.10.0,pep8==1.5.7,pika==0.10.0,pika-pool==0.1.3,ply==3.9,positional==1.1.1,prettytable==0.7.2,PuLP==1.6.1,pyasn1==0.1.9,pycadf==2.4.0,pycparser==2.17,pyflakes==0.8.1,Pygments==2.1.3,pyinotify==0.9.6,pyOpenSSL==16.2.0,pyparsing==1.5.7,python-ceilometerclient==2.7.0,python-cinderclient==1.9.0,python-dateutil==2.6.0,python-editor==1.0.1,python-glanceclient==2.5.0,python-heatclient==1.5.0,python-ironicclient==1.8.0,python-keystoneclient==3.6.0,python-mimeparse==1.6.0,python-muranoclient==0.11.1,python-neutronclient==6.0.0,python-novaclient==6.0.0,python-openstackclient==3.3.0,python-subunit==1.2.0,python-swiftclient==3.1.0,pytz==2016.7,PyYAML==3.12,reno==1.8.0,repoze.lru==0.6,requests==2.11.1,requests-mock==1.1.0,requestsexceptions==1.1.3,retrying==1.3.3,rfc3986==0.4.1,Routes==2.3.1,simplejson==3.10.0,six==1.10.0,snowballstemmer==1.2.1,Sphinx==1.3.6,sphinx-rtd-theme==0.1.9,SQLAlchemy==1.1.3,sqlalchemy-migrate==0.10.0,sqlparse==0.2.2,stevedore==1.18.0,suds-jurko==0.6,Tempita==0.5.2,tenacity==3.3.0,testrepository==0.0.20,testscenarios==0.5.0,testtools==2.2.0,traceback2==1.4.0,unicodecsv==0.14.1,unittest2==1.1.0,urllib3==1.19,warlock==1.2.0,WebOb==1.6.2,wrapt==1.10.8,yaql==1.1.1py27" rel="noreferrer" class="gmail_msg" target="_blank">http://git.openstack.org/openstack/congress@b2d96b56f721c941e85db565d203df008c455b19#egg=congress,contextlib2==0.5.4,coverage==4.2,cryptography==1.5.3,debtcollector==1.9.0,decorator==4.0.10,docutils==0.12,dogpile.cache==0.6.2,enum34==1.1.6,eventlet==0.19.0,extras==1.0.0,fasteners==0.14.1,fixtures==3.0.0,flake8==2.2.4,funcsigs==1.0.2,functools32==3.2.3.post2,futures==3.0.5,futurist==0.19.0,greenlet==0.4.10,hacking==0.10.2,idna==2.1,ipaddress==1.0.17,iso8601==0.1.11,Jinja2==2.8,jsonpatch==1.14,jsonpointer==1.10,jsonschema==2.5.1,keystoneauth1==2.15.0,keystonemiddleware==4.10.0,kombu==3.0.37,linecache2==1.0.0,lxml==3.6.4,Mako==1.0.6,MarkupSafe==0.23,mccabe==0.2.1,mock==2.0.0,monotonic==1.2,mox3==0.18.0,msgpack-python==0.4.8,netaddr==0.7.18,netifaces==0.10.5,openstacksdk==0.9.9,os-client-config==1.22.0,osc-lib==1.2.0,oslo.concurrency==3.15.0,oslo.config==3.19.0,oslo.context==2.10.0,oslo.db==4.14.0,oslo.i18n==3.10.0,oslo.log==3.17.0,oslo.messaging==5.12.0,oslo.middleware==3.20.0,oslo.policy==1.16.0,oslo.serialization==2.14.0,oslo.service==1.17.0,oslo.utils==3.18.0,oslo.vmware==2.15.0,oslosphinx==4.8.0,oslotest==2.11.0,Paste==2.0.3,PasteDeploy==1.5.2,pbr==1.10.0,pep8==1.5.7,pika==0.10.0,pika-pool==0.1.3,ply==3.9,positional==1.1.1,prettytable==0.7.2,PuLP==1.6.1,pyasn1==0.1.9,pycadf==2.4.0,pycparser==2.17,pyflakes==0.8.1,Pygments==2.1.3,pyinotify==0.9.6,pyOpenSSL==16.2.0,pyparsing==1.5.7,python-ceilometerclient==2.7.0,python-cinderclient==1.9.0,python-dateutil==2.6.0,python-editor==1.0.1,python-glanceclient==2.5.0,python-heatclient==1.5.0,python-ironicclient==1.8.0,python-keystoneclient==3.6.0,python-mimeparse==1.6.0,python-muranoclient==0.11.1,python-neutronclient==6.0.0,python-novaclient==6.0.0,python-openstackclient==3.3.0,python-subunit==1.2.0,python-swiftclient==3.1.0,pytz==2016.7,PyYAML==3.12,reno==1.8.0,repoze.lru==0.6,requests==2.11.1,requests-mock==1.1.0,requestsexceptions==1.1.3,retrying==1.3.3,rfc3986==0.4.1,Routes==2.3.1,simplejson==3.10.0,six==1.10.0,snowballstemmer==1.2.1,Sphinx==1.3.6,sphinx-rtd-theme==0.1.9,SQLAlchemy==1.1.3,sqlalchemy-migrate==0.10.0,sqlparse==0.2.2,stevedore==1.18.0,suds-jurko==0.6,Tempita==0.5.2,tenacity==3.3.0,testrepository==0.0.20,testscenarios==0.5.0,testtools==2.2.0,traceback2==1.4.0,unicodecsv==0.14.1,unittest2==1.1.0,urllib3==1.19,warlock==1.2.0,WebOb==1.6.2,wrapt==1.10.8,yaql==1.1.1<br class="gmail_msg">
py27</a> runtests: PYTHONHASHSEED='<a href="tel:(423)%20517-1505" value="+14235171505" class="gmail_msg" target="_blank">4235171505</a>'<br class="gmail_msg">
py27 runtests: commands[0] | find . -type f -name *.py[c|o] -delete<br class="gmail_msg">
py27 runtests: commands[1] | python setup.py testr --slowest --testr-args=<br class="gmail_msg">
running testr<br class="gmail_msg">
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \<br class="gmail_msg">
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \<br class="gmail_msg">
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \<br class="gmail_msg">
${PYTHON:-python} -m subunit.run discover -t ./ ./congress/tests --list<br class="gmail_msg">
--- import errors ---<br class="gmail_msg">
Failed to import test module: congress.tests.datasources.test_magnum_driver<br class="gmail_msg">
Traceback (most recent call last):<br class="gmail_msg">
  File "/opt/stack/congress/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path<br class="gmail_msg">
    module = self._get_module_from_name(name)<br class="gmail_msg">
  File "/opt/stack/congress/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name<br class="gmail_msg">
    __import__(name)<br class="gmail_msg">
  File "congress/tests/datasources/test_magnum_driver.py", line 18, in <module><br class="gmail_msg">
    from congress.datasources import magnum_driver<br class="gmail_msg">
  File "congress/datasources/magnum_driver.py", line 16, in <module><br class="gmail_msg">
    from magnumclient import client as magnum_client<br class="gmail_msg">
ImportError: No module named magnumclient<br class="gmail_msg">
Non-zero exit code (2) from test listing.<br class="gmail_msg">
error: testr failed (3)<br class="gmail_msg">
ERROR: InvocationError: '/opt/stack/congress/.tox/py27/bin/python setup.py testr --slowest --testr-args='<br class="gmail_msg">
__________________________________________________________________________________________________ summary __________________________________________________________________________________________________<br class="gmail_msg">
ERROR:   py27: commands failed"<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Pep8 is ok.<br class="gmail_msg">
What should I do to solve the error above?<br class="gmail_msg">
<br class="gmail_msg">
Anyway I've errors with the translators..<br class="gmail_msg">
I've add the code to review.<br class="gmail_msg">
<br class="gmail_msg">
Ruben<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div></div>