AI_Reader icon indicating copy to clipboard operation
AI_Reader copied to clipboard

Getting an index error

Open Niko2756 opened this issue 9 years ago • 5 comments

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

Niko2756 avatar Jun 17 '16 21:06 Niko2756

@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

llSourcell avatar Jun 18 '16 05:06 llSourcell

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.

Niko2756 avatar Jun 18 '16 05:06 Niko2756

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

llSourcell avatar Sep 22 '16 03:09 llSourcell

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

MotorCityCobra avatar Sep 23 '16 17:09 MotorCityCobra

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!!

quintendewilde avatar May 29 '17 21:05 quintendewilde