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

Running into a type mismatch error #39

Open
StKi2 opened this issue Aug 17, 2019 · 2 comments
Open

Running into a type mismatch error #39

StKi2 opened this issue Aug 17, 2019 · 2 comments

Comments

@StKi2
Copy link

StKi2 commented Aug 17, 2019

Hi thanks for this package, I was able to resolve dependencies and get it to run, but ran into this:

INFO:root:Begin transform
Traceback (most recent call last):
File "main.py", line 111, in
main()
File "main.py", line 39, in main
observations, nlp = transform(observations, nlp)
File "main.py", line 81, in transform
observations['candidate_name'] = observations['text'].apply(lambda x:
File "/Library/Python/2.7/site-packages/pandas/core/series.py", line 3591, in apply
mapped = lib.map_infer(values, f, convert=convert_dtype)
File "pandas/_libs/lib.pyx", line 2217, in pandas._libs.lib.map_infer
File "main.py", line 82, in
field_extraction.candidate_name_extractor(x, nlp))
File "/Users/vladin/Downloads/ResumeParser-master/bin/field_extraction.py", line 13, in candidate_name_extractor
doc = nlp(input_string)
File "/Library/Python/2.7/site-packages/spacy/language.py", line 320, in call
doc = self.make_doc(text)
File "/Library/Python/2.7/site-packages/spacy/language.py", line 293, in
self.make_doc = lambda text: self.tokenizer(text)
TypeError: Argument 'string' has incorrect type (expected unicode, got str)

@noexit12
Copy link

field_extraction.py // Line 13
change: doc = nlp(input_string)
to: doc = nlp(unicode(input_string, 'utf-8'))

@Dasuni-Uthpala
Copy link

i'm getting this error when i try to run the package. can anyone help me out?

INFO:root:End extract
INFO:root:Begin transform
Traceback (most recent call last):
File "main.py", line 116, in
main()
File "main.py", line 39, in main
observations, nlp = transform(observations, nlp)
File "main.py", line 84, in transform
if observations['candidate_name'] == "NOT FOUND":
File "C:\Users\Dasuni Uthpala\anaconda3\envs\env37\lib\site-packages\pandas\core\generic.py", line 1478, in nonzero
.format(self.class.name))
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

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