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

Getting an index error #1

Open
Niko2756 opened this issue Jun 17, 2016 · 5 comments
Open

Getting an index error #1

Niko2756 opened this issue Jun 17, 2016 · 5 comments

Comments

@Niko2756
Copy link

Niko2756 commented Jun 17, 2016

print(sys.argv[1])
IndexError: list index out of range

Hey I'm getting a index error when I try and run test.py and also when I made my own copy of test.py. It looks like whatever array that argv[1] is referring to has not been made by the time is referred to at the top of test.py. My question is where is this array located so I can fix it or has anyone else come up with this error and found a solution

also getting an IndexError here as well
/syntaxnet/demo_lib.py", line 21, in get_root_word
root = dependency_tree[2].split()[0]
IndexError: list index out of range

@llSourcell
Copy link
Owner

@Niko2756 try just using a one word argument in the command line like

test.py hello

still get an error? i think the error has to due with parsing the number of words from the command line. it may be too many different words

@Niko2756
Copy link
Author

I am getting this:

Nicholass-MacBook-Pro:syntaxnet Niko$ python test.py hello
hello
syntaxnet/demo.sh: line 31: bazel-bin/syntaxnet/parser_eval: No such file or directory
syntaxnet/demo.sh: line 43: bazel-bin/syntaxnet/parser_eval: No such file or directory
syntaxnet/demo.sh: line 55: bazel-bin/syntaxnet/conll2tree: No such file or directory
Traceback (most recent call last):
File "test.py", line 10, in
root = demo_lib.get_root_word(dep_tree)
File "/Users/Niko/Downloads/AI_Reader-master/syntaxnet/demo_lib.py", line 21, in get_root_word
root = dependency_tree[2].split()[0]

I think I've installed everything except the one thing that is not working and not installed is this: bazel test --linkopt=-headerpad_max_install_names
syntaxnet/... util/utf8/...

could that be causing the error?

When I try to run the bazel test i get this:
Nicholass-MacBook-Pro:syntaxnet Niko$ bazel test --linkopt=-headerpad_max_install_names \

syntaxnet/... util/utf8/...
ERROR: package contains errors: syntaxnet.
ERROR: no such package 'external': Error encountered while dealing with the WORKSPACE file: WORKSPACE file could not be parsed.
INFO: Elapsed time: 0.062s
ERROR: Couldn't start the build. Unable to run tests.

I'm going to keep on working on it, But any help would be super appreciated.

@llSourcell
Copy link
Owner

@Niko2756 did you ever figure this out? if so if you could make a PR i'd merge it thanks

@MotorCityCobra
Copy link

I get the same type of error. But I also have a problem with "/bin/sh: syntaxnet/demo.sh:"
It says "No such file or directory"
I don't know what '/bin/sh:' is but syntaxnet/demo.sh: is in the root file with everything.

Here's what I'm getting

$ python /Users/MyName/Desktop/AIReader/AI.py What is the most important word in this sentence?
What
/bin/sh: syntaxnet/demo.sh: No such file or directory
Traceback (most recent call last):
File "/Users/MyName/Desktop/AIReader/AI.py", line 10, in
root = demo_lib.get_root_word(dep_tree)
File "/Users/MyName/Desktop/AIReader/demo_lib.py", line 21, in get_root_word
root = dependency_tree[2].split()[0]
IndexError: list index out of range

@quintendewilde
Copy link

Also have the same error! And also the AI_Writer also doesn't work. 2 beautiful projects that are broken @llSourcell time to fix both?? :)
That would be super awesome!!
That would be super awesome!!

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

4 participants