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


Groups > comp.lang.python > #105748

Re: PLEASE HELP -- TOTALLY NEW TO PYTHON

Newsgroups comp.lang.python
Date 2016-03-26 04:51 -0700
References <mailman.23.1458986352.28225.python-list@python.org>
Message-ID <770f81e2-02bc-4a9c-9bbf-a9abb257b4cb@googlegroups.com> (permalink)
Subject Re: PLEASE HELP -- TOTALLY NEW TO PYTHON
From Ned Batchelder <ned@nedbatchelder.com>

Show all headers | View raw


On Saturday, March 26, 2016 at 5:59:30 AM UTC-4, Juan Dent 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

It looks like you are not the first to encounter this:
https://github.com/yuzhichang/cppdep/issues/2

I don't see a quick fix to this in the code.  If you fix this one spot,
likely there will be other problem.

It looks to me like you should install NetworkX 1.7 to get it to work.

--Ned.

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


Thread

PLEASE HELP -- TOTALLY NEW TO PYTHON Juan Dent <juandent@mac.com> - 2016-03-25 23:31 -0600
  Re: PLEASE HELP -- TOTALLY NEW TO PYTHON Ned Batchelder <ned@nedbatchelder.com> - 2016-03-26 04:51 -0700
  Re: PLEASE HELP -- TOTALLY NEW TO PYTHON Steven D'Aprano <steve@pearwood.info> - 2016-03-26 22:52 +1100

csiph-web