Ask Your Question

tox -epy34 errors

asked 2016-05-18 01:35:56 -0500

sanjana gravatar image

I am using ubuntu 12.04 for testing master branch of horizon. When i try to run tox -epy34, i get the below error

ERROR: Failure: TypeError (can't use a string pattern on a bytes-like object)
Traceback (most recent call last):
  File "/home/stack/horizon/.tox/py34/lib/python3.4/site-packages/nose/", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/home/stack/horizon/.tox/py34/lib/python3.4/site-packages/nose/", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/stack/horizon/.tox/py34/lib/python3.4/site-packages/nose/", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/stack/horizon/.tox/py34/lib/python3.4/site-packages/nose/", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/stack/horizon/.tox/py34/lib/python3.4/", line 235, in load_module
    return load_source(name, filename, file)
  File "/home/stack/horizon/.tox/py34/lib/python3.4/", line 171, in load_source
    module = methods.load()
  File "<frozen importlib._bootstrap>", line 1220, in load
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/stack/horizon/openstack_dashboard/management/commands/", line 116, in <module>
    subprocess.check_output(cmd[0], stderr=subprocess.STDOUT))
TypeError: can't use a string pattern on a bytes-like object

Slowest 5 tests took 25.61 secs:
    10.30    NetworkTopologyTests.test_json_view
    5.25    FloatingIpViewTests.test_disassociate_post
    5.12    RouterActionTests.test_router_create_post_exception_error_case_409
    2.71    AccessAndSecurityNeutronProxyTests.test_index
    2.23    NetworkTopologyTests.test_json_view_router_disabled
Ran 1574 tests in 143.560s

FAILED (SKIP=11, errors=1)
Destroying test database for alias 'default'...
ERROR: InvocationError: '/home/stack/horizon/.tox/py34/bin/python -u test --settings=openstack_dashboard.test.settings --exclude-dir=openstack_dashboard/test/integration_tests openstack_dashboard'
___________________________________________________________________ summary ___________________________________________________________________
ERROR:   py34: commands failed
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-05-18 09:32:31 -0500

updated 2016-05-19 22:33:25 -0500

We run official CI tests of horizon changes on Ubuntu 14.04 at the moment, and don't see that error. For example, this ran yesterday on a change which was subsequently merged:

When did this first start? Was it working for you up until recently? Also, where did you obtain your Python 3.4 interpreter for Ubuntu 12.04? As reflects, it was not officially packaged and distributed in Ubuntu until 14.04 LTS (Trusty Tahr).

Note that bugs in Horizon (including bugs in its unit tests) should be reported to the bug tracker instead:

edit flag offensive delete link more


I have python 2.7.6 running. I ran tox last month and things seemed fine. Then i had a fresh clone of horizon repository, and when i tried running tox -epy34 in that repository i got the above error. But i submitted my patch on gerrit and the python34 tests passed

sanjana gravatar imagesanjana ( 2016-05-19 03:19:16 -0500 )edit

I asked which version of Python 3.4 you have installed, since tox -e py34 uses Python 3.4.x not Python 2.7.x.

fungi gravatar imagefungi ( 2016-05-19 11:35:10 -0500 )edit

Python 3.4.3

sanjana gravatar imagesanjana ( 2016-05-19 22:04:22 -0500 )edit

This at least matches the version of Python 3.4 we're using on Ubuntu 14.04 LTS in the official OpenStack CI, so it's unlikely to be a behavior specific to your version of the interpreter.

fungi gravatar imagefungi ( 2016-05-19 22:25:34 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-05-18 01:35:56 -0500

Seen: 235 times

Last updated: May 19 '16