Opened 9 years ago

Closed 7 years ago

#1343 closed defect (wontfix)

TorCtl python issues

Reported by: hololeap Owned by:
Priority: Low Milestone:
Component: Torctl Version: 0.2.1.25
Severity: Keywords:
Cc: hololeap, Sebastian, mikeperry, nickm, atagar, arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by atagar)

The latest stable TorCtl svn (https://svn.torproject.org/svn/torctl/trunk) consistantly fails with the following error

Traceback (most recent call last):

File "/home/admin/tor/torctl2/python/TorCtl/TorCtl.py", line 560, in _eventLoop

self._handleFn(timestamp, reply)

File "/home/admin/tor/torctl2/python/TorCtl/TorCtl.py", line 1094, in _handle1

self._map1.get(event.event_name, self.unknown_event)(event)

File "/home/admin/tor/torctl2/python/TorCtl/PathSupport.py", line 1855, in circ_status_event

self.check_circuit_pool()

File "/home/admin/tor/torctl2/python/TorCtl/PathSupport.py", line 1807, in check_circuit_pool

self.build_circuit("255.255.255.255", 80)

File "/home/admin/tor/torctl2/python/TorCtl/PathSupport.py", line 1817, in build_circuit

circ = self.c.build_circuit(self.selmgr.select_path())

File "/home/admin/tor/torctl2/python/TorCtl/PathSupport.py", line 1237, in select_path

return self.path_selector.select_path(self.pathlen)

File "/home/admin/tor/torctl2/python/TorCtl/PathSupport.py", line 896, in select_path

if self.path_restrict.path_is_ok(path):

File "/home/admin/tor/torctl2/python/TorCtl/PathSupport.py", line 118, in path_is_ok

if not rs.path_is_ok(path):

File "/home/admin/tor/torctl2/python/TorCtl/PathSupport.py", line 589, in path_is_ok

if r.continent != prev.continent:

AttributeError: GeoIPRouter instance has no attribute 'continent'
Terminated

[Automatically added by flyspray2trac: Operating System: Other Linux]

Child Tickets

Attachments (1)

tor-autocircuit.py (4.3 KB) - added by hololeap 9 years ago.
Controller script

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by hololeap

comment:2 Changed 9 years ago by hololeap

This is the controller script I have been using:
http://pastebin.com/J20euagT

Changed 9 years ago by hololeap

Attachment: tor-autocircuit.py added

Controller script

comment:3 Changed 9 years ago by atagar

Issue looks to lie in GeoIPSupport.py, lines 97-104:

97 if self.country_code != None:
98 c = get_continent(self.country_code)
99 if c != None:

100 self.continent = c.code
101 self.cont_group = c.group
102 else:
103 plog("INFO", self.nickname + ": Country code not found")
104 self.continent = None

the router's content parameter is left unset if get_content provides None (usually
it's a bad idea to make existence of an object's parameters conditional like this -
pylint would highlight this sort of issue, btw).

Cheers! -Damian

comment:4 Changed 9 years ago by nickm

Component: Tor - Tor clientTor - Torctl

comment:5 Changed 7 years ago by atagar

Description: modified (diff)
Resolution: Nonewontfix
Status: newclosed

This doesn't seem to be disrupting the BW auths. Resolving.

https://blog.torproject.org/blog/torctl-deprecation-and-stem-plans

Note: See TracTickets for help on using tickets.