Skip to content

Problems in Windows with byte <-> str variable type conflict throwing errors #15

@ValleyLad

Description

@ValleyLad

Has anyone got this to work in Windows?
I'm having this problem:

from practNLPTools.tools import Annotator
annotator = Annotator()
sent = 'The rain in Spain stays mainly on the plain'
annotator.getAnnotations(sent)['srl']
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\super\AppData\Local\Programs\Python\Python35-32\lib\site-packages\practNLPTools\tools.py", line 208, in getAnnotations
no_verbs=len(senna_tags[0].split("\t"))-6
TypeError: a bytes-like object is required, not 'str'

Now even when I use ".encode" or "bytes()" around the string objects in line 208, it still throws the same error at me.

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