ComE icon indicating copy to clipboard operation
ComE copied to clipboard

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

Open Hua233 opened this issue 6 years ago • 3 comments

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.

Hua233 avatar Mar 29 '19 01:03 Hua233

I also encountered this problem. Have you solved it?

ghost avatar Sep 11 '19 07:09 ghost

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!

etsoukanara avatar May 15 '20 16:05 etsoukanara

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.

ChenglongMa avatar Jun 01 '22 01:06 ChenglongMa