new python complains: md5 deprecated! Exit!

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
attlinux
Newbie
Newbie
Posts: 9
Joined: October 4th, 2012, 4:31 am

new python complains: md5 deprecated! Exit!

Post 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 ?
User avatar
sander
Release Testers
Release Testers
Posts: 8829
Joined: January 22nd, 2008, 2:22 pm

Re: new python complains: md5 deprecated! Exit!

Post 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.
genehenry
Newbie
Newbie
Posts: 1
Joined: March 26th, 2014, 4:40 am

Re: new python complains: md5 deprecated! Exit!

Post by genehenry »

the md5 module is deprecated

new zealand holiday packages
Last edited by genehenry on March 28th, 2014, 8:43 am, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: new python complains: md5 deprecated! Exit!

Post 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.
Post Reply