Opened 5 years ago

Closed 5 years ago

#14539 closed defect (not a bug)

stem.controller Controller set_conf results in error on Windows 7

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

Description

Traceback (most recent call last):

  File "ths.py", line 41, in <module>
    print ths.create('localhost', port, 80)
  File "C:\Users\legind\Desktop\ths\hidden_service.py", line 26, in create
    controller.set_conf("HiddenServiceDir", hidden_service_dir)
  File "C:\virtualenv\lib\site-packages\stem\control.py", line 1994, in set_conf

  self.set_options({param: value}, False)

File "C:\virtualenv\lib\site-packages\stem\control.py", line 2094, in set_options

  raise stem.[wiki:ProtocolError]('Returned unexpected status code: %s' % response.code)

stem.[wiki:ProtocolError]: Returned unexpected status code: 551

Getting this on Windows 7, stem 1.3.0. Controller already has an active socket. Also getting the same error for set_options

Child Tickets

Change History (2)

comment:1 Changed 5 years ago by atagar

Hi legind. That's interesting, thanks for the bug report! That 551 status indicates an internal error within tor...

https://gitweb.torproject.org/torspec.git/tree/control-spec.txt#n1239

If you connect to tor via telnet can you reproduce the issue by calling that SETCONF command directly?

https://stem.torproject.org/faq.html#can-i-interact-with-tors-controller-interface-directly

comment:2 Changed 5 years ago by legind

Resolution: not a bug
Status: newclosed

Hey atagar. Wireshark was my friend here. The 551 was being caused by a configuration error parsing Windows paths with the HiddenServiceDir option. Had to do a path.replace('\\', r'\\').

My mistake.

Note: See TracTickets for help on using tickets.