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

Run apls.py first time error #6

Closed
antran89 opened this issue Oct 23, 2018 · 4 comments
Closed

Run apls.py first time error #6

antran89 opened this issue Oct 23, 2018 · 4 comments

Comments

@antran89
Copy link

antran89 commented Oct 23, 2018

Hi,

When I run python apls.py as in the README file, it will generate the following errors. Please fix.
I use networkx==2.2 library.

Traceback (most recent call last):
  File "apls.py", line 1648, in <module>
    main()
  File "apls.py", line 1275, in main
    verbose=verbose)
  File "apls.py", line 722, in create_gt_graph
    super_verbose=False)
  File "apls.py", line 653, in clean_sub_graphs
    for u,v in all_lengths.iteritems():
AttributeError: 'generator' object has no attribute 'iteritems'

Thanks.

@avanetten
Copy link
Contributor

I am guessing that you are using python 3. We built APLS with python 2, and haven't yet ported it to python 3. The python 3 version should be coming soon.

@antran89
Copy link
Author

Hi @avanetten,
I am using python2

MAC:~ an.tran$ python
Python 2.7.15 (default, Sep 18 2018, 20:16:18)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

@avanetten
Copy link
Contributor

The issue is networkx 2.2. The apls_environment.yml file uses networkx 1.11, which treats iterators differently than networkx 2.2. Once we update the code to python 3, we will also use the most recent version of networkx, but for now I recommend just invoking the included environment with:
conda env create -f apls_environment.yml
source activate apls_environment

@antran89
Copy link
Author

Any updates on this thread. Thanks.

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