Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #105774
| From | Joel Goldstick <joel.goldstick@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: PLEASE HELP -- TOTALLY NEW TO PYTHON |
| Date | 2016-03-26 13:26 -0400 |
| Message-ID | <mailman.49.1459013221.28225.python-list@python.org> (permalink) |
| References | <30049892-D089-451B-A839-03D825448588@mac.com> |
On Sat, Mar 26, 2016 at 1:31 AM, Juan Dent <juandent@mac.com> wrote: > > I am trying to run ‘python cppdep.py’ but get the following: > > > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ > analyzing dependencies among all components ... > Traceback (most recent call last): > File "cppdep.py", line 675, in <module> > main() > File "cppdep.py", line 643, in main > calculate_graph(digraph) > File "cppdep.py", line 570, in calculate_graph > (cycles, dict_node2cycle) = 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… Please 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. -- Joel Goldstick http://joelgoldstick.com/ <http://joelgoldstick.com/stats/birthdays> http://cc-baseballstats.info/
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: PLEASE HELP -- TOTALLY NEW TO PYTHON Joel Goldstick <joel.goldstick@gmail.com> - 2016-03-26 13:26 -0400
csiph-web