473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Help with PicklingError (Can't pickle x: it's not the same object as x)

>>> sys.platform, sys.version
('freebsd4', '2.2.3 (#2, Nov 17 2003, 17:03:14) \n[GCC 2.95.3 20010315
(release) [FreeBSD]]')

I've poured through pickle.py (line 525) and see where the
PicklingError is being raised, but I can't figure out what conditions
would create the error.

It's testing a class' identity with the object's class that's being
pickled. Somewhere along the line, the original class and the class
of the instance being pickled have parted ways.

Could this have been caused by a reload(module) call somewhere along
the line? I thought that reload would only replace the module in
sys.modules if the file module.py had changed since the original
import. I'm pretty certain that the object's class is not being
altered between the time its module was imported and the time of the
pickling attempt.

Note: the object being pickled is a subclass of 'dict'. I'm creating
a test case where my class is just a subclass of 'object' to see if
the error is related to that...

Thansk,
Tracy
Jul 18 '05 #1
0 2901

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jesse Bloom | last post by:
I keep running into a problem when I use pickle or cPickle to unpickle a python object I have serialized from the database. I read the string for the serialized object. Apparently I am missing an...
4
by: Jacob H | last post by:
Hello list... I'm developing an adventure game in Python (which of course is lots of fun). One of the features is the ability to save games and restore the saves later. I'm using the pickle...
6
by: Igorati | last post by:
Ok, this is what I have so far: #This program will ask for a user to imput numbers. The numbers will then be calculated #to find the statistical mean, mode, and median. Finallly the user will be...
25
by: virg | last post by:
Hi, i have client-server application which is written in python using XMLRPC protocol. The existing client is a command line. Now client application we are converting it as Web UI using java. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.