Opened 8 months ago

Closed 8 months ago

#28550 closed defect (fixed)

stem integ tests fail on python 2 with str/bytes error

Reported by: teor Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Using stem 1.7.0-dev, commit 670f403bb3f5df82cf7d16d938e4b37ddfd09917:
https://travis-ci.org/teor2345/tor/jobs/457780454#L1747

And python 2.7.5-5ubuntu3:
https://travis-ci.org/teor2345/tor/jobs/457780454#L1535

I see the following error:
https://travis-ci.org/teor2345/tor/jobs/457780454#L3456

======================================================================
ERROR: test_from_str_multiple
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/teor2345/tor/stem/test/unit/descriptor/descriptor.py", line 45, in test_from_str_multiple
    RelayDescriptor.content({'router': 'relay2 71.35.133.197 9001 0 0'}),
TypeError: sequence item 1: expected str instance, bytes found
======================================================================
ERROR: test_from_str_type_handling
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/teor2345/tor/stem/test/unit/descriptor/descriptor.py", line 33, in test_from_str_type_handling
    desc = Descriptor.from_str('@type server-descriptor 1.0\n' + desc_text)
TypeError: Can't convert 'bytes' object to str implicitly
----------------------------------------------------------------------

Child Tickets

Change History (1)

comment:1 Changed 8 months ago by atagar

Resolution: fixed
Status: newclosed

Oops! Sorry about that teor, fixed: https://gitweb.torproject.org/stem.git/commit/?id=2ea9347

On a side note I suspect you might have the wrong python version. With python2 the tests should have been passing, the mistake was with python3.

Note: See TracTickets for help on using tickets.