This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients alexandre.vassalotti, pitrou, vinay.sajip
Date 2011-08-03.09:55:13
SpamBayes Score 3.448189e-10
Marked as misclassified No
Message-id <1312365315.8.0.593753926369.issue12687@psf.upfronthosting.co.za>
In-reply-to
Content
The attached 2.x-written protocol 0 pickle file cannot be loaded by Python 3.2 or 3.3, though it loads successfully in 2.x.

Code used to load:

data = pickle.load(open('test.bin', 'rb'))

Error:

Traceback (most recent call last):
  File "load_it.py", line 4, in <module>
    data = pickle.load(open(sys.argv[1], 'rb'))
ValueError: invalid literal for int() with base 10: "273\n(g8\nS'uint64_t'\np274\ntp275\nsS'Module'\np276\n(g45\n(g39\nS'objc_module'\np277\nNtp278\ntp279\nsS'mach_msg_trailer_size_t'\np280\n(g4\ng190\ntp281\nsS'uint_fast16_t'\np282\n(g8\nS'uint16_t'\np283\ntp284\nsS'pthread_m"

The failure occurs on Ubuntu Natty. This does not appear to be the same issue as #6137.

AFAIK the data contains no classes: just dictionaries, tuples, lists, strings and numbers.
History
Date User Action Args
2011-08-03 09:55:15vinay.sajipsetrecipients: + vinay.sajip, pitrou, alexandre.vassalotti
2011-08-03 09:55:15vinay.sajipsetmessageid: <1312365315.8.0.593753926369.issue12687@psf.upfronthosting.co.za>
2011-08-03 09:55:15vinay.sajiplinkissue12687 messages
2011-08-03 09:55:14vinay.sajipcreate