Information-Extraction-Chinese icon indicating copy to clipboard operation
Information-Extraction-Chinese copied to clipboard

NameError: name 'os' is not defined

Open Shengsj opened this issue 7 years ago • 3 comments

I try to run this code,but the main.py always to show this wrong .Although I have trying my best to solve this problem. it's still there. could you give me some advice? Other's code is OK!

Shengsj avatar Dec 12 '17 10:12 Shengsj

I guess you are running on Windows?

The experiment I did was on linux. Perhaps you should check if Windows has other replacement for "os" package in Python?

crownpku avatar Dec 13 '17 02:12 crownpku

On windows, I modified the first line and changed it to # encoding=utf-8 and fixed the error.

geekboood avatar Feb 08 '18 05:02 geekboood

感谢@geekboood,你的方法解决了这个问题

bluesky632 avatar Nov 30 '18 09:11 bluesky632