Skip to content

Stem doesn't recognize error 555 on attach_stream

When trying to attach a stream that is not controlled by the controller using Controller.attach_stream, Tor will reply with error 555. Stem does not recognize this and will throw a generic exception:

stem.ProtocolError: ATTACHSTREAM returned unexpected response code: 555

I think an InvalidArguments exception would be best suited for this error code.

@@ -1981,6 +1981,8 @@ class Controller(BaseController):
         raise stem.InvalidRequest(response.code, response.message)
       elif response.code == '551':
         raise stem.OperationFailed(response.code, response.message)
+      elif response.code == '555':
+        raise stem.InvalidArguments(response.code, response.message)
       else:
         raise stem.ProtocolError("ATTACHSTREAM returned unexpected response code: %s" % response.code)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information