mapio / py-web-graph

A simple package allowing to use WebGraph data in Python (via the Jython interpreter).
GNU General Public License v3.0
15 stars 1 forks source link

Immutable Graph not defined #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  $ ~/jython2.5.1/jython -Dpython.path='~/Downloads/webgraph-
2.4.3/webgraph-2.4.3.jar'  -m pywebgr.console

2. write this at the console: graph example

What is the expected output? What do you see instead?
expected:no error message
actual: Error: global name 'ImmutableGraph' is not defined

What version of the product are you using? On what operating system?
Checked out from SVN. Machine:Mac  OS - OS X 10.5.8

Please provide any additional information below.

Original issue reported on code.google.com by priya.si...@gmail.com on 29 Mar 2010 at 7:18

GoogleCodeExporter commented 9 years ago
Sorry, I see this only now, for some reason I wasn't getting any notification 
from 
Google about this issue.

I'm not sure about the reason you put the jar on the Python path, but for sure 
you 
need to have it (and all the dependencies) also on your CLASSPATH. 

Can you try using all the packages in

    http://webgraph.dsi.unimi.it/webgraph-deps.tar.gz

by adding them to your CLASSPATH and then excuting jython?

Ciao,
    Massimo

Original comment by massimo.santini on 7 May 2010 at 3:29

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I encountered the same problem. all paths are configured correctly.  help.

Original comment by Luansand...@gmail.com on 24 May 2012 at 9:25

GoogleCodeExporter commented 9 years ago
I don't think your pahts are ok. Here is what to do to setup a minimalistic 
test environment:

# prepare a dir to store all the needed jar
mkdir lib

# download and extract dependencies
curl -s http://webgraph.dsi.unimi.it/webgraph-deps.tar.gz | tar -C lib -zxvf -

# download and extract webgraph jar
curl -s http://webgraph.dsi.unimi.it/webgraph-3.0.7-bin.tar.gz | tar 
--strip-components 1 -C lib -zxvf - webgraph-3.0.7/webgraph-3.0.7.jar

# set the classpath
export CLASSPATH=$(ls -1 lib/*.jar | paste -d : -s )

# download the pywebgraph package
svn export  http://py-web-graph.googlecode.com/svn/trunk src

# set the python path for jython
export JYTHONPATH=src

# download a sample dataset
for ext in graph properties; do
    curl -s http://data.law.dsi.unimi.it/webdata/cnr-2000/cnr-2000.$ext > example.$ext
done

# recompute the offsets (see http://law.dsi.unimi.it/tutorial.php)
java it.unimi.dsi.webgraph.BVGraph -o -O -L example

# launch the console 
jython -m pywebgraph.console

# here is the output i got following 
http://packages.python.org/pyWebGraph/quickstart/console.html example
# >> graph example
# >> pwn
# #0 
# >> ls
# 0: #1 
# 1: #4 
# 2: #8 
# 3: #219 
# 4: #220

I'm closing the bugrep again. If you still have issues, please submit a 
complete and precise set of steps needed to replicate it.

Hope this helps,
    Massimo

Original comment by massimo.santini on 1 Jun 2012 at 8:20

GoogleCodeExporter commented 9 years ago

Original comment by massimo.santini on 1 Jun 2012 at 8:24