Skip to content

cannot use a string pattern on a bytes-like object #22

@iamredencio

Description

@iamredencio

I tried to run this query:
tagger.get_entities('University of California is located in California, United States')

and got this error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-76-0a5190e4b836> in <module>()
----> 1 tagger.get_entities('University of California is located in California, United States')

~\AppData\Local\Continuum\anaconda3\lib\site-packages\ner-0.1-py3.6.egg\ner\client.py in get_entities(self, text)
     89                 groupby(entities, key=itemgetter(0)))
     90         else: #inlineXML
---> 91             entities = self.__inlineXML_parse_entities(tagged_text)
     92         return self.__collapse_to_dict(entities)
     93 

~\AppData\Local\Continuum\anaconda3\lib\site-packages\ner-0.1-py3.6.egg\ner\client.py in __inlineXML_parse_entities(self, tagged_text)
     62         """
     63         return (match.groups() for match in
---> 64             INLINEXML_EPATTERN.finditer(tagged_text))
     65 
     66     def __collapse_to_dict(self, pairs):

What causes this? I did not change anything of the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions