Hodžův blog

30 Čvc

HowTo fix a problem „DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha“ in Pyzor

After a fresh Pyzor install I’m getting this error message:
# aptitude install pyzor
# pyzor discover
/usr/lib/pymodules/python2.6/pyzor/__init__.py:11: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
/usr/lib/pymodules/python2.6/pyzor/client.py:12: DeprecationWarning: the multifile module has been deprecated since Python 2.5
import multifile
downloading servers from http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x


A simple fix for this problem exists. Open file /usr/bin/pyzor.
# vi /usr/bin/pyzor

Delete line
#!/usr/bin/python

And insert this new one
#!/usr/bin/python -Wignore::DeprecationWarning
Test it
# pyzor discover
downloading servers from http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x

That’s all folks!

2 Responses to “HowTo fix a problem „DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha“ in Pyzor”

  1. 1
    Bartosz Says:

    Thank you.

  2. 2
    Cara mengatasi “DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha“ Di Spamassassin | Personal Blog Says:

    […] Done, semoga berhasil dan thanks to http://hodza.net for great solution […]

Leave a Reply

Hodžův blog is is proudly powered by Wordpress and the Magellan Theme