Closed kris-singh closed 8 years ago
The errors occurs inside lib2to3
which is a library that converts Python2 code to Python3, which is called when trying to import Networkx (which is a dependency of Icarus).
I need more information to help you:
setup.sh
successfully without any error being raised?python --version
from your shell.If your default Python version is 3.x, try with 2.x. This code has not been tested with Python 3. To do so, edit the run.sh
file and replace all calls to python
with calls to python2
.
Hope this helps. Lorenzo
Ubuntu 14.04 Python version is 2.7
Hi, this is a very late reply but I didn't realize you commented again on the issue and it wasn't solved yet. It turns out that another person had your same problem and it was solved by installing NetworkX 1.7 using pip. Hopefully that will solve your problem too.
Details of the solutions here -> #2
while runnig in the virtual enviorment the following error came ADDING ICARUS TO PYTHON PATH CREATING DIRECTORIES FOR GRAPHS AND LOGS EXECUTING SIMULATIONS Traceback (most recent call last): File "run.py", line 12, in
from fnss import read_event_schedule, read_topology
File "/home/kris/hashrouting-icn13-results-master/venv/local/lib/python2.7/site-packages/fnss/init.py", line 36, in
from fnss.topologies import
File "/home/kris/hashrouting-icn13-results-master/venv/local/lib/python2.7/site-packages/fnss/topologies/init.py", line 4, in
from fnss.topologies.datacenter import
File "/home/kris/hashrouting-icn13-results-master/venv/local/lib/python2.7/site-packages/fnss/topologies/datacenter.py", line 7, in
import networkx as nx
File "/home/kris/hashrouting-icn13-results-master/venv/local/lib/python2.7/site-packages/networkx/init.py", line 87, in
import networkx.readwrite
File "/home/kris/hashrouting-icn13-results-master/venv/local/lib/python2.7/site-packages/networkx/readwrite/init.py", line 14, in
from networkx.readwrite.gml import *
File "/home/kris/hashrouting-icn13-results-master/venv/local/lib/python2.7/site-packages/networkx/readwrite/gml.py", line 46, in
from lib2to3.refactor import RefactoringTool
File "/usr/lib/python2.7/lib2to3/refactor.py", line 27, in
from .fixer_util import find_root
File "/usr/lib/python2.7/lib2to3/fixer_util.py", line 9, in
from .pygram import python_symbols as syms
File "/usr/lib/python2.7/lib2to3/pygram.py", line 32, in
python_grammar = driver.load_grammar(_GRAMMAR_FILE)
File "/usr/lib/python2.7/lib2to3/pgen2/driver.py", line 113, in load_grammar
logger = logging.getLogger()
AttributeError: 'module' object has no attribute 'getLogger'
PLOTTING RESULTS
[PLOT] Plotting cache hit ratio vs alpha
Traceback (most recent call last):
File "plot.py", line 312, in
main()
File "plot.py", line 98, in main
plot_chr_alpha_sensitivity()
File "plot.py", line 124, in plot_chr_alpha_sensitivity
S = SummaryAnalyzer(path.join(SUMMARY_LOG_DIR, 'SUMMARY_CACHE_HIT_RATIO.txt'))
File "/home/kris/hashrouting-icn13-results-master/icarus/analysis.py", line 19, in init
self.data = genfromtxt(summary_file, dtype=None, delimiter='\t', names=True)
File "/home/kris/hashrouting-icn13-results-master/venv/local/lib/python2.7/site-packages/numpy/lib/npyio.py", line 1448, in genfromtxt
fhd = iter(np.lib._datasource.open(fname, 'rbU'))
File "/home/kris/hashrouting-icn13-results-master/venv/local/lib/python2.7/site-packages/numpy/lib/_datasource.py", line 151, in open
return ds.open(path, mode)
File "/home/kris/hashrouting-icn13-results-master/venv/local/lib/python2.7/site-packages/numpy/lib/_datasource.py", line 501, in open
raise IOError("%s not found." % path)
IOError: /home/kris/hashrouting-icn13-results-master/logs/SUMMARY_CACHE_HIT_RATIO.txt not found.
DONE