Opened 3 years ago

Closed 3 years ago

#12185 closed defect (fixed)

@type stripping having issues with python3

Reported by: atagar Owned by: atagar
Priority: High Milestone:
Component: Core Tor/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>
        stem.interpreter.main()
      File "/usr/lib/python3.4/site-packages/stem/interpreter/__init__.py", line 116, in main
        response = interpreter.run_command(user_input)
      File "/usr/lib/python3.4/site-packages/stem/util/conf.py", line 276, in wrapped
        return func(*args, config = config, **kwargs)
      File "/usr/lib/python3.4/site-packages/stem/interpreter/commands.py", line 317, in run_command
        output = self.do_info(arg)
      File "/usr/lib/python3.4/site-packages/stem/interpreter/commands.py", line 184, in do_info
        for desc in server_desc_query:
      File "/usr/lib/python3.4/site-packages/stem/descriptor/remote.py", line 328, in __iter__
        for desc in self._run(True):
      File "/usr/lib/python3.4/site-packages/stem/descriptor/remote.py", line 317, in _run
        for desc in results:
      File "/usr/lib/python3.4/site-packages/stem/descriptor/__init__.py", line 211, in parse_file
        for desc in file_parser(descriptor_file):
      File "/usr/lib/python3.4/site-packages/stem/descriptor/__init__.py", 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/server_descriptor.py", 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 3 years ago by atagar

Description: modified (diff)

comment:2 Changed 3 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.