Ask Your Question

Peter's profile - activity

2020-06-28 16:55:55 +0200 received badge  Notable Question (source)
2020-04-29 15:45:10 +0200 received badge  Nice Question (source)
2015-06-21 12:28:33 +0200 received badge  Popular Question (source)
2012-07-03 23:22:32 +0200 received badge  Famous Question (source)
2012-06-12 05:39:47 +0200 received badge  Notable Question (source)
2012-06-04 05:10:10 +0200 received badge  Popular Question (source)
2012-05-20 18:41:23 +0200 received badge  Editor (source)
2012-05-20 18:40:17 +0200 asked a question "code for hash md5 was not found" after fresh Sage 5.0 install on fresh Ubuntu 12.04 install

I had Sage 4.8 running fine on Ubuntu 11.10. I did a new installation of Ubuntu 12.04 in a new partition, downloaded Sage 5.0 64-bit, verified the MD5 sum and unpacked, and ran ./sage. After the paths were reset, I got a slew of messages about "code for hash <x> not found". (The first message was about md5, but as you can see below, there were many others that failed.) I deleted the Sage directory in /home and redid the Sage download and install, with the same result. In hashlib.py where the code issues the message, there is the note "some may not work due to the OpenSSL version not supporting that algorithm." I do have the latest level of the openssl and python-openssl packages that are available on the Ubuntu repositories, and it appears that the code is trying all the standard ones, nothing exotic. Any ideas?

peterhu@peterhu-ThinkPad-T420:~/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux$ ./sage
----------------------------------------------------------------------
| Sage Version 5.0, Release Date: 2012-05-14                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
The Sage installation tree may have moved
(from /scratch/buildbot/sage/redhawk-1/redhawk_binary/build/sage-5.0 to /home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux).

Changing various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done resetting paths.

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)

ValueError: unsupported hash type md5

ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha1

ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha224

ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256

ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File ...
(more)
2010-11-29 15:47:43 +0200 received badge  Supporter
2010-11-26 21:13:40 +0200 commented answer UnpicklingError when trying to run notebook()

Thanks for posting the details of the paths and specific pickle files. Since I'm just trying Sage out, I didn't have to recover information, but I'll remember that this procedure is here. I don't know all the factors that can affect Sage's paths, but I actually found the snapshots, presumably the .bz2 files, under .../.sage/sage_notebook.sagenb/home/<user>/<worksheet id="">/snapshots.

2010-11-26 20:55:48 +0200 commented answer UnpicklingError when trying to run notebook()

Yes, renaming the folder took care of the problem. And realizing that there was such a folder was a big step forward. I see nothing in the Installation Guide that states explicitly that the Sage installation creates it. Now that I know it's there, I understand the statement in the Installation Guide about the DOT_SAGE environment variable. Thank you!

2010-11-21 11:07:22 +0200 commented question UnpicklingError when trying to run notebook()

Any ideas? I get this error consistently when I do a complete reinstall of Sage. Since others don't get it, and since I didn't get it the very first time I installed a prior level of Sage, I assume there's something about my environment that causes this. But I thought I read that Sage comes with everything it uses, so I have no idea what in my environment could cause the problem.

2010-11-08 20:18:40 +0200 received badge  Student (source)
2010-11-05 21:23:25 +0200 commented question UnpicklingError when trying to run notebook()

BTW, what I downloaded was sage-4.6-linux-32bit-ubuntu_10.04_lts-i686-Linux.tar.lzma

2010-11-05 21:15:58 +0200 asked a question UnpicklingError when trying to run notebook()

When I first downloaded and installed Sage (several versions ago) to try it out on Ubuntu, everything worked without error. I didn't do much with it, time passed, and when I came back to Sage, I saw 4.6 was there. I completely erased the folder that Sage was in, downloaded and untarred 4.6, and ran Sage. That's fine--commands input in the terminal work fine. But when I try to run notebook(), I get

UnpicklingError Traceback (most recent call last)

/home/me/.sage/<ipython console=""> in <module>()

/home/me/Math/sage46/devel/sagenb/sagenb/notebook/notebook_object.pyc in __call__(self, args, *kwds) 215 """ 216 def __call__(self, args, *kwds): --> 217 return self.notebook(args, *kwds) 218 219 notebook = run_notebook.notebook_twisted . . . UnpicklingError: invalid load key, 'n'.

I know how to spell Python, but not much more. Any idea what got messed up and suggestions on how to fix it?