[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #16348 [Stem]: raise stem.InvalidArguments('552', 'GETINFO request contained unrecognized keywords:



#16348: raise stem.InvalidArguments('552', 'GETINFO request contained unrecognized
keywords:
--------------------+----------------------------------
 Reporter:  toralf  |          Owner:  atagar
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:
Component:  Stem    |        Version:  Tor: unspecified
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+----------------------------------
 with tor-0.2.6.9 and stem-1.4.1 I run (rarely) into this :
 {{{
 cat ioerror.stderr.old
 Exception in thread Event Notifier:
 Traceback (most recent call last):
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 1758, in
 get_network_status
     desc_content = self.get_info(query, get_bytes = True)
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 414, in
 wrapped
     raise exc
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 409, in
 wrapped
     return func(self, *args, **kwargs)
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 1113, in
 get_info
     raise exc
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 1066, in
 get_info
     stem.response.convert('GETINFO', response)
   File "/usr/lib64/python3.3/site-packages/stem/response/__init__.py",
 line 135, in convert
     message._parse_message(**kwargs)
   File "/usr/lib64/python3.3/site-packages/stem/response/getinfo.py", line
 38, in _parse_message
     raise stem.InvalidArguments('552', 'GETINFO request contained
 unrecognized keywords: %s\n' % ', '.join(unrecognized_keywords),
 unrecognized_keywords)
 stem.InvalidArguments: GETINFO request contained unrecognized keywords:
 ns/id/2BCDF9F0BCEFC2A44F7850F92362BA85AA226E1F


 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/usr/lib64/python3.3/threading.py", line 901, in _bootstrap_inner
     self.run()
   File "/usr/lib64/python3.3/threading.py", line 858, in run
     self._target(*self._args, **self._kwargs)
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 882, in
 _event_loop
     self._handle_event(event_message)
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 3480, in
 _handle_event
     listener(event_message)
   File "./err.py", line 47, in orconn_event
     relay = controller.get_network_status(fingerprint)
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 414, in
 wrapped
     raise exc
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 409, in
 wrapped
     return func(self, *args, **kwargs)
   File "/usr/lib64/python3.3/site-packages/stem/control.py", line 1761, in
 get_network_status
     raise stem.DescriptorUnavailable("Tor was unable to provide the
 descriptor for '%s'" % relay)
 stem.DescriptorUnavailable: Tor was unable to provide the descriptor for
 '2BCDF9F0BCEFC2A44F7850F92362BA85AA226E1F'
 }}}
 while running this script :
 {{{
 $ cat err.py
 #!/usr/bin/python3 -u

 #   Toralf Foerster
 #   Hamburg
 #   Germany

 # collect data wrt to
 https://trac.torproject.org/projects/tor/ticket/13603
 #

 import time
 import functools

 from stem import ORStatus, ORClosureReason
 from stem.control import EventType, Controller


 def main():
   class Cnt(object):
     def __init__(self, done=0, closed=0, ioerror=0):
       self.done = done
       self.closed = closed
       self.ioerror = ioerror

   c = Cnt()

   with Controller.from_port(port=9051) as controller:
     controller.authenticate()

     orconn_listener = functools.partial(orconn_event, controller, c)
     controller.add_event_listener(orconn_listener, EventType.ORCONN)

     while True:
       time.sleep(1)

 def orconn_event(controller, c, event):
   if event.status == ORStatus.CLOSED:
     c.closed += 1

     if event.reason == ORClosureReason.DONE:
       c.done += 1

     if event.reason == ORClosureReason.IOERROR:
       c.ioerror += 1

       fingerprint = event.endpoint_fingerprint
       print (" %i %i %i %i %s %40s" % (c.closed, c.done, c.ioerror,
 event.arrived_at, time.ctime(event.arrived_at), fingerprint), end='')
       relay = controller.get_network_status(fingerprint)
       if relay:
         print (" %15s %5i %s %s" % (relay.address, relay.or_port,
 controller.get_info("ip-to-country/%s" % relay.address, 'unknown'),
 relay.nickname), end='')
       print ('', flush=True)

 if __name__ == '__main__':
   main()
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16348>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs