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!
Thank you.
23 srpna, 2011 at 3:20 pm[…] Done, semoga berhasil dan thanks to http://hodza.net for great solution […]
1 února, 2013 at 3:37 pm