Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named copy_reg #3

Open
valentinedwv opened this issue Oct 5, 2015 · 6 comments
Open

ImportError: No module named copy_reg #3

valentinedwv opened this issue Oct 5, 2015 · 6 comments

Comments

@valentinedwv
Copy link

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\textteaser__init__.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
Copy link
Contributor

MojoJolo commented Oct 6, 2015

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

@pavelmalai
Copy link

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
Copy link

maronin commented Apr 9, 2016

@pavelmalai This fixed the issue for me. Thanks!

@graichen
Copy link

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
Copy link

Ayla93 commented Oct 27, 2017

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

@pavelmalai
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants