Opened 6 years ago

Closed 6 years ago

#12185 closed defect (fixed)

@type stripping having issues with python3

Reported by: atagar Owned by: atagar
Priority: High Milestone:
Component: Archived/Stem Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by atagar)

zoltan reports the following stacktrace with python3...

    >>> /info 0xRADIUM
    Traceback (most recent call last):
      File "/usr/bin/tor-prompt", line 8, in <module>
      File "/usr/lib/python3.4/site-packages/stem/interpreter/", line 116, in main
        response = interpreter.run_command(user_input)
      File "/usr/lib/python3.4/site-packages/stem/util/", line 276, in wrapped
        return func(*args, config = config, **kwargs)
      File "/usr/lib/python3.4/site-packages/stem/interpreter/", line 317, in run_command
        output = self.do_info(arg)
      File "/usr/lib/python3.4/site-packages/stem/interpreter/", line 184, in do_info
        for desc in server_desc_query:
      File "/usr/lib/python3.4/site-packages/stem/descriptor/", line 328, in __iter__
        for desc in self._run(True):
      File "/usr/lib/python3.4/site-packages/stem/descriptor/", line 317, in _run
        for desc in results:
      File "/usr/lib/python3.4/site-packages/stem/descriptor/", line 211, in parse_file
        for desc in file_parser(descriptor_file):
      File "/usr/lib/python3.4/site-packages/stem/descriptor/", line 261, in _parse_metrics_file
        for desc in stem.descriptor.server_descriptor._parse_file(descriptor_file, is_bridge = False, validate = validate, **kwargs):
      File "/usr/lib/python3.4/site-packages/stem/descriptor/", line 146, in _parse_file
        if descriptor_content[0].startswith('@type'):
    TypeError: startswith first arg must be bytes or a tuple of bytes, not str 

This will likely warrant a hotfix for the stem 1.2 release.

Child Tickets

Change History (2)

comment:1 Changed 6 years ago by atagar

Description: modified (diff)

comment:2 Changed 6 years ago by atagar

Resolution: fixed
Status: newclosed

Fixed, and uploaded a Stem 1.2.1 hotfix release. Feel free to reopen if you run into any other issues!

Note: See TracTickets for help on using tickets.