Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Exception there in main.py #2

Open
arima-sambunath opened this issue Dec 15, 2017 · 2 comments
Open

Exception there in main.py #2

arima-sambunath opened this issue Dec 15, 2017 · 2 comments

Comments

@arima-sambunath
Copy link

The Idea of pdf to xml very impressive but one exception there when run this code at python2/3

Traceback (most recent call last):
File "pdf2xml.py", line 563, in
main(sys.argv)
File "pdf2xml.py", line 90, in main
tree = make_xml(objs,n,tree)
File "pdf2xml.py", line 511, in make_xml
xml = gen_xml(group_by(regobjs,n),n,xml)
File "pdf2xml.py", line 421, in group_by
for p in concave( sort_by_font (find_tables(objs)[0], 0 )[0],50,100)[0]:
File "pdf2xml.py", line 206, in concave
tmp.append(graph.nodes()[i])
File "/home/sambhu/env-2demo/local/lib/python2.7/site-packages/networkx/classes/reportviews.py", line 178, in getitem
return self._nodes[n]
KeyError: 8

@Hovera
Copy link

Hovera commented May 23, 2018

Yes, I have similar problem...

File "/Users/Cutthroat/anaconda3/envs/python2_pdfminer/lib/python2.7/site-packages/networkx/classes/reportviews.py", line 178, in getitem
return self._nodes[n]
KeyError: 2

@huanghuanghui
Copy link

The Idea of pdf to xml very impressive but one exception there when run this code at python2/3

Traceback (most recent call last):
File "pdf2xml.py", line 563, in
main(sys.argv)
File "pdf2xml.py", line 90, in main
tree = make_xml(objs,n,tree)
File "pdf2xml.py", line 511, in make_xml
xml = gen_xml(group_by(regobjs,n),n,xml)
File "pdf2xml.py", line 421, in group_by
for p in concave( sort_by_font (find_tables(objs)[0], 0 )[0],50,100)[0]:
File "pdf2xml.py", line 206, in concave
tmp.append(graph.nodes()[i])
File "/home/sambhu/env-2demo/local/lib/python2.7/site-packages/networkx/classes/reportviews.py", line 178, in getitem
return self._nodes[n]
KeyError: 8

how to fix it?

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

No branches or pull requests

3 participants