Skip to content

Instantly share code, notes, and snippets.

@Marlena
Created January 13, 2011 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marlena/778507 to your computer and use it in GitHub Desktop.
Save Marlena/778507 to your computer and use it in GitHub Desktop.
import pagerank
4 import sys
5 import simplejson
6
7 file = sys.argv[1]
8 json_data = open(file)
9 #print json_data
10 pages_list = json.load(json_data)
11 print pages_listt
12 print "#######"
*************************STACKTRACE OF DOOM*******************************
Traceback (most recent call last):
File "pagerank_list.py", line 10, in <module>
pages_list = json.load(json_data)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/__init__.py", line 267, in load
parse_constant=parse_constant, **kw)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/decoder.py", line 319, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/decoder.py", line 336, in raw_decode
obj, end = self._scanner.iterscan(s, **kw).next()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/scanner.py", line 55, in iterscan
rval, next_pos = action(m, context)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/decoder.py", line 193, in JSONObject
raise ValueError(errmsg("Expecting , delimiter", s, end - 1))
ValueError: Expecting , delimiter: line 3 column 2 (char 58)
Macintosh-2:python marlena$ python pagerank_list.py pagerank_names_file.txt
Traceback (most recent call last):
File "pagerank_list.py", line 5, in <module>
import simplejson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment