the forums at degreez.net

It is currently Fri Apr 19, 2024 10:22 pm

All times are UTC - 7 hours [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
PostPosted: Sat Apr 10, 2004 4:08 pm 
Offline

Joined: Mon Mar 15, 2004 8:35 am
Posts: 418
Whenever I try to use NAT check logging via bttrack.py's "--log_nat_checks 1" option and a peer connects, I get this error output in BitTornado 0.1.4:

Code:
Traceback (most recent call last):
  File "/home/bt/BitTornado-CVS/BitTornado/RawServer.py", line 130, in listen_forever
    self.sockethandler.handle_events(events)
  File "/home/bt/BitTornado-CVS/BitTornado/SocketHandler.py", line 263, in handle_events
    s.handler.data_came_in(s, data)
  File "/home/bt/BitTornado-CVS/BitTornado/BT1/NatCheck.py", line 82, in data_came_in
    x = self.next_func(m)
  File "/home/bt/BitTornado-CVS/BitTornado/BT1/NatCheck.py", line 66, in read_peer_id
    self.answer(True)
  File "/home/bt/BitTornado-CVS/BitTornado/BT1/NatCheck.py", line 43, in answer
    self.resultfunc(result, self.downloadid, self.peerid, self.ip, self.port)
  File "/home/bt/BitTornado-CVS/BitTornado/BT1/track.py", line 824, in connectback_result
    self.natchecklog(peerid, ip, port, x)
  File "/home/bt/BitTornado-CVS/BitTornado/BT1/track.py", line 809, in natchecklog
    print '%s - %s [%02d/%3s/%04d:%02d:%02d:%02d] "!natcheck-%s:%i" %i 0 - -' % (
NameError: global name 'months' is not defined


I have Python 2.3, wxGTK 2.4.1.2, and wxPython 2.4.1.2 installed.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 10, 2004 4:36 pm 
Offline

Joined: Mon Mar 15, 2004 8:35 am
Posts: 418
Heh. This was easier to fix than I thought! I added this on line 809 of track.py (in BitTornado/BT1):

Code:
        from time import strptime
        months = [""]
        for x in range(1,13):
           months.append( strftime("%b", strptime(str(x),"%m") ) )


and now "months" is defined with abbreviated months! :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 10, 2004 9:45 pm 
Offline

Joined: Sun Mar 07, 2004 10:05 am
Posts: 1212
I fixed this a little differently, but thanks for the report.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 11, 2004 6:24 am 
Offline

Joined: Mon Mar 15, 2004 8:35 am
Posts: 418
Are there any plans to encode or escape the peer id that is output in the logs in some manner when NAT check logging is enabled? Using "tail -f" on the log on a text console in linux on a somewhat active tracker with NAT check logging enabled results in the server beeping madly and the characters on the text/virtual console randomly scrambling up.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 11, 2004 2:47 pm 
Offline

Joined: Sun Mar 07, 2004 10:05 am
Posts: 1212
Oops. <fixes that>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 132 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group