Page 1 of 1

new python complains: md5 deprecated! Exit!

Posted: March 25th, 2014, 4:01 am
by attlinux
Hello,
I use SABNZBD on Linux. I upgraded to latest "porteus 3.0" 64bit Linux (www.porteus.org) , with newest python:


Python 2.6.6 (r266:84292, Nov 27 2010, 17:27:14)
[GCC 4.5.1] on linux2


When I try to start Sabnzbd, now I get the following error:


bash-4.2$ /usr/local/src/SABnzbd-0.7.16/cherrypy/lib/cptools.py:8: DeprecationWarning: the md5 module is deprecated; use hashlib instead
from md5 import new as md5
Traceback (most recent call last):
File "/usr/local/src/SABnzbd-0.7.16/SABnzbd.py", line 44, in <module>
import cherrypy
File "/usr/local/src/SABnzbd-0.7.16/cherrypy/__init__.py", line 161, in <module>
from cherrypy import _cptools
File "/usr/local/src/SABnzbd-0.7.16/cherrypy/_cptools.py", line 226, in <module>
from cherrypy.lib import cptools, encoding, auth, static, tidy
File "/usr/local/src/SABnzbd-0.7.16/cherrypy/lib/cptools.py", line 8, in <module>
from md5 import new as md5
File "/usr/lib64/python2.6/md5.py", line 10, in <module>
from hashlib import md5
File "/usr/lib64/python2.6/hashlib.py", line 136, in <module>
md5 = __get_builtin_constructor('md5')
File "/usr/lib64/python2.6/hashlib.py", line 63, in __get_builtin_constructor
import _md5
ImportError: No module named _md5

[2]+ Exit 1 python /usr/local/src/SABnzbd-0.7.16/SABnzbd.py


Any help of just what to do ?

Re: new python complains: md5 deprecated! Exit!

Posted: March 25th, 2014, 4:46 am
by sander
start python and type "from md5 import new as md5".

Like this:

Code: Select all

$ python
Python 2.7.3 (default, Feb 27 2014, 20:00:17)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from md5 import new as md5
>>>
$
If that doesn't work, fix your python installation.

Re: new python complains: md5 deprecated! Exit!

Posted: March 27th, 2014, 3:54 am
by genehenry
the md5 module is deprecated

new zealand holiday packages

Re: new python complains: md5 deprecated! Exit!

Posted: March 27th, 2014, 4:37 am
by shypike
Deprecated doesn't mean "not available".
Even 2.7 distributions still contain the md5 module.
attlinux's Python installation has a problem.

It's the third-party CherryPy web library that contains the problem.
The version of CherryPy module we use is fairly old and will be replaced in the next major SABnzbd release.