Skip to content
New issue

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

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

Already on GitHub? # to your account

I have the trouble "name '__current_graph' is not defined" in function "_write_walks_to_disk(agrs)" #3

Open
Hua233 opened this issue Mar 29, 2019 · 3 comments

Comments

@Hua233
Copy link

Hua233 commented Mar 29, 2019

when i use the function "_write_walks_to_disk(args)", the terminal will hint "name '__current_graph' is not defined". I wonder if global variables cannot be invoked in the process.

@ghost
Copy link

ghost commented Sep 11, 2019

I also encountered this problem. Have you solved it?

@etsoukanara
Copy link

etsoukanara commented May 15, 2020

Same problem (Windows10). Can anybody help with this?

Update:

Steps I followed and worked for me:

  1. In comE-master: conda env create -f env.yml removing packages related with linux

  2. Add following block of code to "cython_utils.py" under the line from distutils.core import setup:

try:
    from setuptools import setup
    from setuptools import Extension
except ImportError:
    from distutils.core import setup
    from distutils.extension import Extension
  1. python cython_utils.py build_ext --inplace

  2. In file "util/graph_utils.py" line 13 add ThreadPoolExecutor function:
    from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
    and in def write_walks_to_disk replace ProcessPoolExecutor with ThreadPoolExecutor in lines 146, 150.

Hope that helps!

@ChenglongMa
Copy link

I think we need to avoid the global variables __current_graph and __vertex2str.

Here is my solution.
I've created a pull request to fix this.

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

No branches or pull requests

3 participants