nitmir / btdht

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

make install : btdht/krcp.pyx:1472:29: Cannot assign None to int #8

Closed w888 closed 5 years ago

w888 commented 6 years ago

hi

i gotten error, when doing make on the latest code, can you help?

 Error compiling Cython file:
 ------------------------------------------------------------
 ...
                 else:
                     self.addr_addr_2 = addr[0]
                 self.addr_port = addr[1]
         def __del__(self):
             self.addr_addr = None
             self.addr_port = None
                             ^
 ------------------------------------------------------------

 btdht/krcp.pyx:1472:29: Cannot assign None to int
 Compiling btdht/dht.pyx because it changed.
 Traceback (most recent call last):
   File "setup.py", line 28, in <module>
 Compiling btdht/krcp.pyx because it changed.
 Compiling btdht/utils.pyx because it changed.
 [1/3] Cythonizing btdht/dht.pyx
 [2/3] Cythonizing btdht/krcp.pyx
     ext_modules = cythonize("btdht/*.pyx") if has_cython else c_extensions,
   File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 1026, in cythonize
     cythonize_one(*args)
   File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 1146, in cythonize_one
     raise CompileError(None, pyx_file)
 Cython.Compiler.Errors.CompileError: btdht/krcp.pyx
 make: *** [build] Error 1
w888 commented 6 years ago

I resolve it by using earlier Cython

Cython==0.21

instead of latest

Cython==0.28
jcea commented 5 years ago

Please, publish a new version or document this issue in the build instructions.

I just hit this too, and this bug report and patch are a year old already :-).

milahu commented 1 month ago

patch are a year old already

the patch is merged but version 0.3.3 is untagged

the old version 0.3.2 is broken