Bug #2821 fails when run with python3

Added by msuraev 8 days ago. Updated about 2 hours ago.

In Progress
Target version:
Start date:
Due date:
% Done:


Spec Reference:


ERROR: test_unknown_command (main.TestVTY)
Traceback (most recent call last):
File "/home/max/source/gsm/osmo-python-tests/scripts/", line 62, in test_unknown_command
assert(self.vty.verify(test_str, ['% Unknown command.']))
File "/home/max/source/gsm/osmo-python-tests/osmopy/", line 245, in verify
res = self.command(command, close).split('\r\n')
File "/home/max/source/gsm/osmo-python-tests/osmopy/", line 223, in command
return self._common_command(request, close)
File "/home/max/source/gsm/osmo-python-tests/osmopy/", line 179, in _common_command
self.socket.send("%s\r" % request)
TypeError: a bytes-like object is required, not 'str'

The error is observed with osmo-msc, osmo-bts etc.


#1 Updated by msuraev 8 days ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

Workaround is available in
The proper fix would be to either migrate to python 3 only code or make it compatible with both python 2 and 3.

#2 Updated by msuraev 1 day ago

  • % Done changed from 10 to 50

Workaround is merged, additional related fix is available in gerrit 5777.

#3 Updated by msuraev 1 day ago

  • % Done changed from 50 to 60

Gerrit 5791 and 5793 should resolve remaining issues.

#4 Updated by msuraev about 2 hours ago

  • % Done changed from 60 to 80

Fixes were merged, there's still weird issue with osmo-pcu where one of the vty tests fails in semingly random fashion. Not sure if it's related or why it's only observed with osmo-pcu jenkins tests.

Also available in: Atom PDF