Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Joel Goldstick Newsgroups: comp.lang.python Subject: Re: PLEASE HELP -- TOTALLY NEW TO PYTHON Date: Sat, 26 Mar 2016 13:26:52 -0400 Lines: 47 Message-ID: References: <30049892-D089-451B-A839-03D825448588@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de uX5UBOQT4zOi1Enu1xI0TA6eYEPHhWJw3b2be7YclhRg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.035 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'line:': 0.07; 'main()': 0.07; 'cc:addr:python-list': 0.09; '-1,': 0.09; 'typeerror:': 0.09; 'python': 0.10; '-1):': 0.16; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:PYTHON': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'trying': 0.22; 'am,': 0.23; 'sat,': 0.23; 'this:': 0.23; '(most': 0.24; 'header :In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'subject: -- ': 0.27; 'url:mailman': 0.30; 'run': 0.33; 'url:python': 0.33; 'traceback': 0.33; 'url:listinfo': 0.34; 'file': 0.34; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'skip:" 50': 0.35; 'skip:& 60': 0.35; 'but': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'skip:& 10': 0.37; 'received:209': 0.38; 'received:209.85.214': 0.39; 'url:mail': 0.40; 'please,': 0.63; 'mar': 0.65; 'url:info': 0.71; '26,': 0.72; 'dent': 0.84; 'ind': 0.84; 'received:209.85.214.181': 0.84; 'received:mail- ob0-f181.google.com': 0.84; 'to:none': 0.91; 'joel': 0.91; 'subject:NEW': 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=C1k/RGUhGb+60xUop+szKk0HnyhLuM3SNKXAzg1WZME=; b=n1gcW3i9ZiLVEWkfeN6rLbWKOqVc6pmhm3/L/zLgAEZhMkrxA4TKARiC+coX7FZswf BMf3dgGFGmfcnqKeH0APrjgiBdmiVzrQkj1N6ANs6yu3S9l3LCgT+VwAn0aol12i7kVi Vq6Ji90Z0hriBIrKrlKCMfAIlFnl6pWfgW8xxPWVKV80gEfbid0K7ZXQP1IaIJA/Ygm8 9dJzCYNVXhu99Bs7AJGH3DNCyyBRdTyR2mXVdg+1v/km9/khS1ANX1Ydf2hBoao2Ce9c LRJ3hN3NTVlDoH0e5w4uFMixznQugIIGqlanWxMGzXcxl38FlAt7WkMe14fGZgKhGK5R Ml2g== 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=C1k/RGUhGb+60xUop+szKk0HnyhLuM3SNKXAzg1WZME=; b=V3/qCGH96A4EMoTx7HC9LNH72h9O9yN8FNjKL+5tv5b7pKl9Mv1u4M0r4yzABWTpn8 0gYpw9zDYBPYGeifLMuH5146+sU9LuykCCT+fl+SWRYoByIfe9Cc0Yf71O0AlXsJ0+dn Q3tw62M62/ADVemm2G/N8fP1eOvuiRqVgy/6mVW3htp6Z/vzEAh0iOpcDPs6KA00HYU2 C5RVn/VOWYJ6lL31nx0KbshGidMTI4x1u/Qs3LIPHHINFeTFIZCGkFxtNqWDD9Beh+aZ NndPJZ/rj5/IRA+Tfxrp+bRAjC5KIkhCSHPiMWocUhCqd6rY5Dqn1CmigYyIOvqG1HFb HtWw== X-Gm-Message-State: AD7BkJKwnhB2QNN5lxC/+9+c6adtOBvKyL4Xf4bvR6BQh80/KNUx4mFLhpuAbN68h23tUayqGJP2l5ivP9zJVw== X-Received: by 10.60.60.3 with SMTP id d3mr5426950oer.66.1459013212140; Sat, 26 Mar 2016 10:26:52 -0700 (PDT) In-Reply-To: <30049892-D089-451B-A839-03D825448588@mac.com> X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:105774 On Sat, Mar 26, 2016 at 1:31 AM, Juan Dent wrote: > > I am trying to run =E2=80=98python cppdep.py=E2=80=99 but get the followi= ng: > > > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@= @@@@@@@ > analyzing dependencies among all components ... > Traceback (most recent call last): > File "cppdep.py", line 675, in > main() > File "cppdep.py", line 643, in main > calculate_graph(digraph) > File "cppdep.py", line 570, in calculate_graph > (cycles, dict_node2cycle) =3D make_DAG(digraph, key_node) > File "/Users/juandent/Downloads/cppdep-master/networkx_ext.py", line 79= , > in make_DAG > for ind in range(len(subgraphs)-1, -1, -1): > TypeError: object of type 'generator' has no len() > > > Please, I know no python and am in a hurry to get this working=E2=80=A6 P= lease help > > > Regards, > Juan > -- > https://mail.python.org/mailman/listinfo/python-list > As a painless quick try I would change this line: for ind in range(len(subgraphs)-1, -1, -1): to this: for ind in range(len(list(subgraphs))-1, -1, -1): If that works, when you have time track down what is really going on. --=20 Joel Goldstick http://joelgoldstick.com/ http://cc-baseballstats.info/