Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103953

Re: A mistake which almost went me mad

From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: A mistake which almost went me mad
Date 2016-03-03 21:31 +1100
Message-ID <mailman.142.1457001098.20602.python-list@python.org> (permalink)
References <56d81044$0$19756$426a74cc@news.free.fr>

Show all headers | View raw


On Thu, Mar 3, 2016 at 9:21 PM, ast <nomail@invalid.com> wrote:
> - python -m pip list doesnt work, crash with an error message related to
> pickle

At this point, you could have come to this list, asking for help - and
posting the *entire* traceback. It may have mentioned a file name,
which would give a strong clue; otherwise, there'd be an error like
this:

rosuav@sikorsky:~/tmp$ echo 'print("Hello, world!")' >pickle.py
rosuav@sikorsky:~/tmp$ python3 -m pip list
Hello, world!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 174, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.6/runpy.py", line 133, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/local/lib/python3.6/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/usr/local/lib/python3.6/site-packages/pip/__init__.py", line
15, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/local/lib/python3.6/site-packages/pip/vcs/subversion.py",
line 9, in <module>
    from pip.index import Link
  File "/usr/local/lib/python3.6/site-packages/pip/index.py", line 29,
in <module>
    from pip.wheel import Wheel, wheel_ext
  File "/usr/local/lib/python3.6/site-packages/pip/wheel.py", line 6,
in <module>
    import compileall
  File "/usr/local/lib/python3.6/compileall.py", line 20, in <module>
    from concurrent.futures import ProcessPoolExecutor
  File "/usr/local/lib/python3.6/concurrent/futures/__init__.py", line
17, in <module>
    from concurrent.futures.process import ProcessPoolExecutor
  File "/usr/local/lib/python3.6/concurrent/futures/process.py", line
55, in <module>
    from multiprocessing.connection import wait
  File "/usr/local/lib/python3.6/multiprocessing/connection.py", line
23, in <module>
    from . import reduction
  File "/usr/local/lib/python3.6/multiprocessing/reduction.py", line
32, in <module>
    class ForkingPickler(pickle.Pickler):
AttributeError: module 'pickle' has no attribute 'Pickler'

And someone would have suggested changing to another directory, or
running something like this:

rosuav@sikorsky:~/tmp$ python3 -c 'import pickle; print(pickle.__file__)'
Hello, world!
/home/rosuav/tmp/pickle.py

which shows up the issue.

Don't get mad - get even! Or even better, get help! But show us the
entire exception traceback, not just "got an exception".

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

A mistake which almost went me mad "ast" <nomail@invalid.com> - 2016-03-03 11:21 +0100
  Re: A mistake which almost went me mad Chris Angelico <rosuav@gmail.com> - 2016-03-03 21:31 +1100
  Re: A mistake which almost went me mad Nick Sarbicki <nick.a.sarbicki@gmail.com> - 2016-03-03 10:43 +0000
  Re: A mistake which almost went me mad Tim Golden <mail@timgolden.me.uk> - 2016-03-03 10:48 +0000
    Re: A mistake which almost went me mad Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-03-04 19:19 +1300
  Re: A mistake which almost went me mad Steven D'Aprano <steve@pearwood.info> - 2016-03-03 23:57 +1100
  Re: A mistake which almost went me mad Tim Chase <python.list@tim.thechases.com> - 2016-03-03 05:48 -0600
  Re: A mistake which almost went me mad Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-03-03 16:29 +0000
    Re: A mistake which almost went me mad Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-03-03 17:53 +0000
  Re: A mistake which almost went me mad Tim Chase <python.list@tim.thechases.com> - 2016-03-03 12:50 -0600
  Re: A mistake which almost went me mad Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-07 09:19 -0700
  Re: A mistake which almost went me mad Random832 <random832@fastmail.com> - 2016-03-07 11:28 -0500
  Re: A mistake which almost went me mad Chris Angelico <rosuav@gmail.com> - 2016-03-08 03:40 +1100
  Re: A mistake which almost went me mad Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-09 08:34 -0800
    Re: A mistake which almost went me mad Rustom Mody <rustompmody@gmail.com> - 2016-03-09 22:13 -0800
      Re: A mistake which almost went me mad Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-10 16:54 -0800

csiph-web