IndigoResearch / textteaser

Official version of TextTeaser.
MIT License
620 stars 143 forks source link

ImportError: No module named copy_reg #3

Open valentinedwv opened 8 years ago

valentinedwv commented 8 years ago

Issues with pickle? Windows 10 python 2.7.6,

C:\Users\valentin\textteaser_nltk\Scripts\python.exe D:/dev_earthcube/textteaser/test.py Traceback (most recent call last): File "D:/dev_earthcube/textteaser/test.py", line 12, in sentences = tt.summarize(title, text) File "D:\dev_earthcube\textteaser\textteaserinit.py", line 13, in summarize result = self.summarizer.summarize(text, title, source, category) File "D:\dev_earthcube\textteaser\textteaser\summarizer.py", line 11, in summarize sentences = self.parser.splitSentences(text) File "D:\dev_earthcube\textteaser\textteaser\parser.py", line 61, in splitSentences tokenizer = nltk.data.load('file:' + os.path.dirname(os.path.abspath(file)) + '/trainer/english.pickle') File "C:\Users\valentin\textteaser_nltk\lib\site-packages\nltk\data.py", line 786, in load resource_val = pickle.load(opened_resource) ImportError: No module named copy_reg

MojoJolo commented 8 years ago

Looks like an issue with pickle and Windows. http://stackoverflow.com/questions/556269/importerror-no-module-named-copy-reg-pickle

pavelmalai commented 8 years ago

I've been struggling with the same problem, and I found that the problem is, git is messing with EOF. After I downloaded it as zip, it compiled just fine.

maronin commented 8 years ago

@pavelmalai This fixed the issue for me. Thanks!

graichen commented 6 years ago

See https://stackoverflow.com/questions/556269/importerror-no-module-named-copy-reg-pickle and consider saving as binary instead of text when you open the file.

Ayla93 commented 6 years ago

Hi maronin and pavelmalai. may i know what did you guys download as a zip file? Im struggling with the same errors

pavelmalai commented 6 years ago

@Ayla93 Just download the project by using the Download Zip button, and not by cloning it.