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.

Title: "logging" example uses unavailable cPickle module
Type: Stage:
Components: Documentation Versions: Python 3.0
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, mnewman
Priority: normal Keywords:

Created on 2009-05-31 16:20 by mnewman, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg88599 - (view) Author: Michael Newman (mnewman) Date: 2009-05-31 16:20
The server portion of the example at:
"15.6.9. Sending and receiving logging events across a network"
uses "import cPickle" which is not available for Python 3.0.1

Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cPickle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named cPickle

Alternatively, I tried to run the example from a script:
Traceback (most recent call last):
line 4, in <module>
    import cPickle
ImportError: No module named cPickle

I fixed it by changing:
"import cPickle" to "import pickle"
"return cPickle.loads(data)" to "return pickle.loads(data)"
msg88601 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-05-31 16:42
Thanks, fixed in r73075.
Date User Action Args
2022-04-11 14:56:49adminsetgithub: 50405
2009-05-31 16:42:05georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg88601
2009-05-31 16:20:37mnewmancreate