nitmir / btdht

A python implementation of the Bittorrent DHT (Distributed Hash Table)
GNU General Public License v3.0
85 stars 30 forks source link

utils.pyx AttributeError: 'generator' object has no attribute 'next' #3

Closed emmercm closed 6 years ago

emmercm commented 7 years ago

I'm getting this error with Python 3.5.2 and btdht 0.3.1:

Traceback (most recent call last):
  ...
  File "...", line 6, in <module>
    dht.start()
  File "btdht/dht.pyx", line 379, in btdht.dht.DHT_BASE.start (btdht/dht.c:7806)
    self._scheduler.add_dht(self)
  File "btdht/utils.pyx", line 917, in btdht.utils.Scheduler.add_dht (btdht/utils.c:17508)
    self.add_thread(name, function, user=user)
  File "btdht/utils.pyx", line 846, in btdht.utils.Scheduler.add_thread (btdht/utils.c:15984)
    typ = iterator.next()
AttributeError: 'generator' object has no attribute 'next'

Process finished with exit code 1

Script is nearly empty:

#!/usr/bin/env python3

import btdht
import binascii
dht = btdht.DHT()
dht.start()
nitmir commented 7 years ago

Ok, the next method on iterator, is moved to __next__ in python 3. a27c7f5 should fix this.

traut commented 6 years ago

since the latest release is broken in python3 because of this issue, could you please make a new release of btdht?

jmaris commented 6 years ago

still appear to be having this issue, it appears that commit was also never pulled ?

nitmir commented 6 years ago

Sorry it took so long to publish the fixed version (from the dev branch), I have been very busy lately.