Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: A mistake which almost went me mad Date: Thu, 3 Mar 2016 21:31:35 +1100 Lines: 60 Message-ID: References: <56d81044$0$19756$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de NXpM70twCEYPT4ncpa0ybg4JChXwfcnrvT8gm+SwxnSg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python3': 0.05; 'skip:" 60': 0.05; 'cc:addr:python-list': 0.09; 'ast': 0.09; 'subject:which': 0.09; 'subversion,': 0.09; 'python': 0.10; 'exception': 0.13; 'skip:f 30': 0.15; 'thu,': 0.15; '"got': 0.16; '2016': 0.16; '23,': 0.16; '32,': 0.16; '55,': 0.16; 'compileall': 0.16; 'doesnt': 0.16; 'echo': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mercurial,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'traceback.': 0.16; 'wrote:': 0.16; 'attribute': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'issue.': 0.20; 'otherwise,': 0.20; 'skip:" 30': 0.20; 'skip:" 40': 0.20; 'suggested': 0.20; 'work,': 0.21; 'this:': 0.23; 'import': 0.24; '(most': 0.24; 'header:In- Reply-To:1': 0.24; 'module': 0.25; 'skip:_ 20': 0.26; 'error': 0.27; 'message-id:@mail.gmail.com': 0.27; "skip:' 10": 0.28; 'crash': 0.29; 'pickle': 0.29; 'code': 0.30; '15,': 0.30; 'help!': 0.30; 'another': 0.32; 'skip:_ 10': 0.32; 'posting': 0.32; 'related': 0.32; 'class': 0.33; 'skip:_ 30': 0.33; 'directory,': 0.33; 'point,': 0.33; 'skip:/ 20': 0.33; 'traceback': 0.33; 'changing': 0.34; 'file': 0.34; 'running': 0.34; 'list': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'skip:" 50': 0.35; 'something': 0.35; 'asking': 0.35; 'but': 0.36; 'list,': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'skip:p 20': 0.38; 'someone': 0.38; 'hello,': 0.40; 'entire': 0.61; 'show': 0.62; 'mar': 0.65; '20,': 0.66; 'chrisa': 0.84; 'pip': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=3XqOn21/uTSsZaDk5NnRYu7jozRsVJsSgt6nBCRK4yE=; b=nl9c0waFsQM6CxcCLo7R8NRmU3EYmHvO2XdBW+EROPWt/sGUMabijBfDY0W4F/ot0o v5WuQ9X6wqA+DeDTBLPWYtfvz0HaorYH6dmEQnJlOWSJIVZru09m+uf2kNPEbKe3NX17 anoFGrCGFc8ecNmFVFcc0ZMthgMTcHduSO8TCf/uY4UPtR1WNyyoQgQGG3HTmdEWjXAX 1Jl22nrNqILGKtcQuvclkekOTZQuHJMyyE8fYidNzXzAdPYlAUo4YSYXaSkvd+taNTPc WtfoiFKWDrT5m7+3gYzx8ygPK+4TiNDwGmkrVoFUsmhFIdGCNzQFWlPRshZTDBn+Ulrp upYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=3XqOn21/uTSsZaDk5NnRYu7jozRsVJsSgt6nBCRK4yE=; b=bHLaNBU7YBUVhyYO9dEPXTfq5XDbUZC8j5S95M+hb28mUk5t3nYnRwAjfbKp0BW/HY eh/OA6tSElfPLatKHzZqDa5nYQlkiNRMJi4QKEPCMyYtHpZJPe5lKALxtzJ1XMSVhcHJ NiD7zahCHLMVwSlFk+id6gVomXOUc7x+feLZv5YL0ZHGS+OjdZbawz7+Ju9V4vl/5CCP VpDF4gp/gWA+iBsa9JhskhubsyvSzfoOrufj5RL2hdBDqH+d8BL/ikxdQ5ysr9eCyJAc eDHin+CQckpRilUpDFjb1wnbae8WG7F7DOoKAlMY3j9WU0Y0A4B0L4BTrP28+Imua541 ilZA== X-Gm-Message-State: AD7BkJKhtAd9HsREspxaD2WcVgfiXkV4vHvYSnYaOVEJFRcJkQwzZmd5Mw/CBhYWAaTbMO2wIiJZ8MAIklMWUQ== X-Received: by 10.50.28.105 with SMTP id a9mr5122759igh.94.1457001095619; Thu, 03 Mar 2016 02:31:35 -0800 (PST) In-Reply-To: <56d81044$0$19756$426a74cc@news.free.fr> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103953 On Thu, Mar 3, 2016 at 9:21 PM, ast 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 from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/usr/local/lib/python3.6/site-packages/pip/vcs/subversion.py", line 9, in from pip.index import Link File "/usr/local/lib/python3.6/site-packages/pip/index.py", line 29, in from pip.wheel import Wheel, wheel_ext File "/usr/local/lib/python3.6/site-packages/pip/wheel.py", line 6, in import compileall File "/usr/local/lib/python3.6/compileall.py", line 20, in from concurrent.futures import ProcessPoolExecutor File "/usr/local/lib/python3.6/concurrent/futures/__init__.py", line 17, in from concurrent.futures.process import ProcessPoolExecutor File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 55, in from multiprocessing.connection import wait File "/usr/local/lib/python3.6/multiprocessing/connection.py", line 23, in from . import reduction File "/usr/local/lib/python3.6/multiprocessing/reduction.py", line 32, in 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