Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unsupported operand type(s) for +: 'EdgeView' and 'list' #3

Closed
miguelwon opened this issue Sep 13, 2019 · 3 comments
Closed

Comments

@miguelwon
Copy link

Hi,
I had this error with a fresh install and using your politician_edges.csvas a testing example.

(env) mwon@mwon:/disk2/MP2Vec/LabelPropagation/src$ python label_propagation.py --input ../data/politician_edges.csv --seed 10 
+-------------------+------------------------------+
|     Parameter     |            Value             |
+===================+==============================+
| Assignment output | ./output/politician.json     |
+-------------------+------------------------------+
| Input             | ../data/politician_edges.csv |
+-------------------+------------------------------+
| Rounds            | 30                           |
+-------------------+------------------------------+
| Seed              | 10                           |
+-------------------+------------------------------+
| Weighting         | overlap                      |
+-------------------+------------------------------+
Traceback (most recent call last):
  File "label_propagation.py", line 17, in <module>
    create_and_run_model(args)
  File "label_propagation.py", line 11, in create_and_run_model
    model = LabelPropagator(graph, args)
  File "/disk2/MP2Vec/LabelPropagation/src/model.py", line 27, in __init__
    self.weight_setup(args.weighting)
  File "/disk2/MP2Vec/LabelPropagation/src/model.py", line 35, in weight_setup
    self.weights  = overlap_generator(overlap, self.graph)
  File "/disk2/MP2Vec/LabelPropagation/src/calculation_helper.py", line 53, in overlap_generator
    edges = edges + [(edge[1], edge[0]) for edge in edges]
TypeError: unsupported operand type(s) for +: 'EdgeView' and 'list'
@benedekrozemberczki
Copy link
Owner

benedekrozemberczki commented Sep 13, 2019 via email

@miguelwon
Copy link
Author

Ok and which networkx version should I use? I had this problem with a fresh instalation, including the needed packages list.

@benedekrozemberczki
Copy link
Owner

benedekrozemberczki commented Sep 13, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants