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

Cannot parse #1

Open
iamkk11 opened this issue Apr 14, 2018 · 3 comments
Open

Cannot parse #1

iamkk11 opened this issue Apr 14, 2018 · 3 comments

Comments

@iamkk11
Copy link

iamkk11 commented Apr 14, 2018

I am getting the below error:

raceback (most recent call last):
File "resume_parser.py", line 280, in
main(sys.argv[1:])
File "resume_parser.py", line 275, in main
resume_parser(file_list, existing_excel)
File "resume_parser.py", line 200, in resume_parser
file_text_map = get_text_from_files(file_list, existing_df)
File "resume_parser.py", line 43, in get_text_from_files
if (not existing_df is None) and any(existing_df.iloc[:, 0] == fn_key):
File "/home/kevin/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 1325, in getitem
return self._getitem_tuple(key)
File "/home/kevin/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 1662, in _getitem_tuple
self._has_valid_tuple(tup)
File "/home/kevin/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 189, in _has_valid_tuple
if not self._has_valid_type(k, i):
File "/home/kevin/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 1597, in _has_valid_type
return self._is_valid_integer(key, axis)
File "/home/kevin/anaconda3/lib/python3.6/site-packages/pandas/core/indexing.py", line 1638, in _is_valid_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds

@yesthisistom
Copy link
Owner

Hey, I added a set of test data to work with, and made a couple minor changes that hopefully should get it cleared up.

I didn't get the error you're seeing, but if you wouldn't mind testing the code in your environment with the test data and minor changes hopefully we can start running down the issue.

What version of python are you using?

@iamkk11
Copy link
Author

iamkk11 commented Apr 15, 2018

@yesthisistom I am using Python 3.6. I managed to clear some errors and it is now working. I also simplified it by removing the image processing part as I dont really need it. Only 1 issue remains. I cannot seem to process the first file in my directory and I also have to set my index to 1 inorder to get it to work. See below. If I set it to 0 it says index out of range.

  #idx = 0
    for i in range(1,len(filelist)):
    #while idx < len(filelist):
        file = filelist[i]
        #idx += 1

@yesthisistom
Copy link
Owner

That is a very odd error - filelist should be a standard list at that point, so zero shouldn't be out of range at all (IF it's populated, but if index 1 is ok then zero should be fine.)

Have you tried inspecting the list at that point to make sure it's as expected?

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

2 participants