MemoryNetworks icon indicating copy to clipboard operation
MemoryNetworks copied to clipboard

AttributeError: 'NoneType' object has no attribute 'strip'

Open yugyoung opened this issue 5 years ago • 1 comments

I run the code using gitpod. when I run the 'python3 train.py' then, the error 'AttributeError: 'NoneType' object has no attribute 'strip'' is occur. How can I fix this error and rerun the code??

yugyoung avatar Jul 27 '20 07:07 yugyoung

You can change the 91 line code in 'utils.py'. from: return [x.strip() for x in re.split('(\W+)?', sent) if x.strip()] to: return [x.strip() for x in re.split('(\W+)(?:\W*)', sent) if x.strip()]

tiamjiakun avatar Apr 28 '23 10:04 tiamjiakun