[Biopython-dev] Pickle problem on 64 bit Windows with Python 3.4

Peter Cock p.j.a.cock at googlemail.com
Tue Apr 22 06:44:18 EDT 2014


On Mon, Apr 21, 2014 at 6:45 PM, Manlio Calvi <manlio.calvi at gmail.com> wrote:
> From what I read here http://hg.python.org/cpython/rev/4a6b8f86b081 could be
> a problem related to that file. Seems to me they stripped the check for a
> quote that must be in, and looking at the pickle apparently isn't
>

OK, now things are more confusing - this seems to be working on
a colleague's machine, so it may be something different on your
setup. Are you using a self compiled Python 3.4?

We installed the 64 bit version Python 3.4 on Windows 7 using the
binary installed from the website (Windows x86-64 MSI installer),
selecting for all users (which probably requires admin rights):
https://www.python.org/ftp/python/3.4.0/python-3.4.0.amd64.msi

We manually downloaded the pickle file via the raw link on GitHub,
and tried the test code (as shown below), and it worked perfectly.

Regards,

Peter

--

C:\Users\xxx\Desktop>ls *.pik
acc_rep_mat.pik

C:\Users\xxx\Desktop>c:\python34\python.exe -c "import pickle; h =
open('acc_rep_mat.pik', 'rb'); m = pickle.load(h);h.close();print(m);"
{('K', 'Q'): 108, ('A', 'F'): 122, ('P', 'W'): 18, ('D', 'F'): 63, ('S', 'Y'): 7
3, ('C', 'M'): 14, ('A', 'N'): 139, ('K', 'Y'): 66, ('I', 'V'): 310, ('G', 'V'):
131, ('T', 'Y'): 91, ('M', 'T'): 35, ('F', 'V'): 160, ('D', 'Q'): 116, ('H', 'Y
'): 43, ('R', 'T'): 114, ('A', 'Q'): 129, ('I', 'P'): 67, ('N', 'V'): 93, ('C',
'R'): 15, ('E', 'F'): 50, ('A', 'R'): 152, ('D', 'S'): 167, ('L', 'T'): 183, ('L
', 'P'): 79, ('I', 'M'): 88, ('C', 'K'): 24, ('E', 'K'): 164, ('G', 'N'): 147, (
'P', 'T'): 92, ('L', 'R'): 109, ('H', 'T'): 69, ('E', 'G'): 146, ('I', 'T'): 88,
('L', 'Y'): 173, ('F', 'W'): 43, ('T', 'T'): 84, ('D', 'W'): 22, ('M', 'V'): 95
, ('K', 'T'): 140, ('W', 'Y'): 51, ('E', 'N'): 115, ('R', 'V'): 88, ('R', 'Y'):
62, ('D', 'Y'): 64, ('G', 'Q'): 89, ('D', 'T'): 125, ('F', 'K'): 67, ('W', 'W'):
32, ('C', 'H'): 10, ('R', 'W'): 23, ('I', 'W'): 38, ('A', 'H'): 66, ('L', 'V'):
447, ('Q', 'Q'): 42, ('D', 'P'): 105, ('D', 'H'): 52, ('M', 'W'): 25, ('S', 'T'
): 172, ('D', 'R'): 115, ('L', 'W'): 74, ('F', 'I'): 151, ('C', 'G'): 39, ('H',
'Q'): 44, ('C', 'V'): 59, ('N', 'P'): 94, ('D', 'E'): 163, ('C', 'E'): 26, ('R',
'R'): 96, ('G', 'K'): 148, ('C', 'S'): 23, ('F', 'Q'): 39, ('G', 'H'): 53, ('R'
, 'S'): 94, ('D', 'I'): 66, ('G', 'R'): 81, ('N', 'Q'): 77, ('M', 'Q'): 27, ('D'
, 'N'): 163, ('C', 'Q'): 16, ('Q', 'W'): 15, ('A', 'T'): 195, ('Y', 'Y'): 82, ('
C', 'F'): 32, ('E', 'H'): 38, ('F', 'S'): 92, ('M', 'P'): 20, ('D', 'L'): 120, (
'A', 'M'): 79, ('C', 'I'): 42, ('I', 'N'): 65, ('E', 'W'): 21, ('F', 'L'): 236,
('G', 'L'): 154, ('A', 'E'): 207, ('G', 'W'): 35, ('H', 'H'): 56, ('I', 'Q'): 62
, ('L', 'L'): 320, ('H', 'N'): 57, ('G', 'G'): 321, ('A', 'C'): 49, ('H', 'I'):
31, ('N', 'W'): 29, ('A', 'I'): 202, ('C', 'L'): 62, ('A', 'W'): 47, ('L', 'S'):
159, ('K', 'S'): 144, ('D', 'D'): 151, ('C', 'P'): 21, ('A', 'D'): 171, ('E', '
L'): 133, ('S', 'S'): 116, ('K', 'R'): 151, ('Q', 'V'): 69, ('L', 'M'): 153, ('A
', 'Y'): 124, ('E', 'T'): 150, ('K', 'P'): 94, ('D', 'V'): 95, ('F', 'G'): 102,
('H', 'L'): 70, ('H', 'K'): 63, ('C', 'Y'): 19, ('K', 'M'): 32, ('F', 'F'): 79,
('H', 'R'): 44, ('P', 'R'): 72, ('M', 'Y'): 41, ('A', 'P'): 119, ('G', 'S'): 161
, ('H', 'P'): 23, ('D', 'G'): 143, ('E', 'M'): 33, ('K', 'N'): 139, ('G', 'I'):
92, ('K', 'W'): 21, ('I', 'S'): 84, ('C', 'T'): 30, ('D', 'K'): 169, ('P', 'Y'):
60, ('I', 'R'): 58, ('M', 'S'): 41, ('N', 'N'): 66, ('N', 'T'): 105, ('F', 'H')
: 39, ('F', 'T'): 69, ('F', 'M'): 67, ('C', 'W'): 8, ('D', 'M'): 20, ('K', 'K'):
121, ('Q', 'Y'): 41, ('V', 'W'): 44, ('C', 'C'): 42, ('M', 'M'): 22, ('T', 'W')
: 35, ('A', 'V'): 252, ('F', 'N'): 55, ('P', 'V'): 109, ('I', 'K'): 80, ('H', 'V
'): 54, ('N', 'R'): 90, ('M', 'N'): 34, ('E', 'Q'): 105, ('A', 'S'): 199, ('G',
'M'): 49, ('H', 'W'): 13, ('N', 'S'): 115, ('T', 'V'): 145, ('E', 'I'): 63, ('F'
, 'R'): 57, ('Q', 'S'): 101, ('K', 'V'): 131, ('K', 'L'): 112, ('A', 'L'): 307,
('Q', 'R'): 73, ('E', 'S'): 143, ('E', 'Y'): 60, ('A', 'K'): 191, ('A', 'G'): 22
9, ('V', 'Y'): 134, ('H', 'S'): 59, ('P', 'S'): 103, ('N', 'Y'): 75, ('G', 'T'):
153, ('G', 'P'): 108, ('I', 'Y'): 94, ('E', 'P'): 91, ('C', 'D'): 15, ('S', 'W'
): 22, ('S', 'V'): 114, ('L', 'N'): 101, ('E', 'E'): 119, ('Q', 'T'): 97, ('E',
'R'): 118, ('F', 'P'): 50, ('P', 'Q'): 68, ('I', 'I'): 145, ('H', 'M'): 16, ('G'
, 'Y'): 101, ('F', 'Y'): 142, ('C', 'N'): 24, ('A', 'A'): 211, ('E', 'V'): 110,
('L', 'Q'): 79, ('P', 'P'): 120, ('I', 'L'): 348, ('M', 'R'): 40, ('V', 'V'): 23
9}

C:\Users\xxx3\Desktop>c:\python34\python.exe -V
Python 3.4.0

C:\Users\xxx\Desktop>c:\python34\python.exe
Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600
64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

So, this works perfectly here.

Peter


More information about the Biopython-dev mailing list