effigies / BitTornado

UNMAINTAINED - John Hoffman's fork of the original bittorrent
Other
150 stars 44 forks source link

AttributeError: 'NatCheck' object has no attribute 'bufferlen' #27

Closed Yuuki2012 closed 8 years ago

Yuuki2012 commented 8 years ago

Got an error again, unrelated to the previous issue:

Traceback (most recent call last): File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever self.sockethandler.handle_events(events) File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 293, in handle_events s.handler.data_came_in(s, data) File "/home/BitTornado/BitTornado/Network/NatCheck.py", line 161, in data_came_in self.read(s) File "/home/BitTornado/BitTornado/Network/NatCheck.py", line 197, in _read if self.bufferlen is not None: AttributeError: 'NatCheck' object has no attribute 'bufferlen'

As of now, the Tracker hasn't crashed yet, so I don't see a problem with it... Just thought I'd mention it.

Edit: Okay the tracker crashes now by spamming the error into console. (to reproduce this error (for me at least); Put a torrent in the torrents directory and 'Update Trackers' on ruTorrent (not sure if it is also the case with other clients))

effigies commented 8 years ago

Thanks for the report. Didn't take long to track down, and I think we can safely remove that branch, as the function it would call also doesn't exist. Opened #28, if you want to verify that it doesn't cause new bugs.

Yuuki2012 commented 8 years ago

I'll check when I'm back on my PC.

Yuuki2012 commented 8 years ago

Ok, I'm not getting the error anymore when Force Updating the tracker on my client(s), so I think you can merge it.

However... I got another error;

Traceback (most recent call last): File "/home/BitTornado/BitTornado/Network/RawServer.py", line 120, in listen_forever self.sockethandler.handle_events(events) File "/home/BitTornado/BitTornado/Network/SocketHandler.py", line 293, in handle_events s.handler.data_came_in(s, data) File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 148, in data_came_in if not c.data_came_in(data) and not c.closed: File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 35, in data_came_in self.next_func = self.next_func(val.decode()) File "/home/BitTornado/BitTornado/Tracker/HTTPHandler.py", line 67, in read_header r = self.handler.getfunc(self, self.path, self.headers) File "/home/BitTornado/BitTornado/Tracker/track.py", line 1005, in get rsize = self.add_data(infohash, event, ip, paramslist) File "/home/BitTornado/BitTornado/Tracker/track.py", line 752, in add_data peers[myid] = peer File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 96, in setitem val = self.valtype(val) File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 79, in init self[k] = v File "/home/BitTornado/BitTornado/Meta/TypedCollections.py", line 110, in setitem raise KeyError('Invalid key: ' + key) KeyError: 'Invalid key: given ip'

effigies commented 8 years ago

Got it. Pushed a new commit.

Yuuki2012 commented 8 years ago

Haven't gotten any errors for ~15min, if anything pops up I'll poke you again ;)