我一直试图在GitHub上运行预处理脚本。 https://github.com/jimmycode/cnn-dailymail-summary
当我在存储库上运行generate_summaries.py时,它在下面产生错误。
File "generate_summaries.py", line 574, in <module>
main()
File "generate_summaries.py", line 570, in main
GenerateMode(args.corpus, args.outdir, args.anonymize)
File "generate_summaries.py", line 535, in GenerateMode
izip(urls, repeat(corpus), repeat(anonymize)))
File "/home/lr/ishigaki/.pyenv/versions/anaconda3-
4.1.0/envs/py27con/lib/python2.7/multiprocessing/pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "/home/lr/ishigaki/.pyenv/versions/anaconda3
-4.1.0/envs/py27con/lib/python2.7/multiprocessing/pool.py", line 567, in get
raise self._value
LookupError: unknown encoding: 'MacCentralEurope'
我尝试过的是:
按照This post中的建议,我首先在pip上安装了win-unicode-console,然后在控制台上设置了一个变量。
pip install pip install win-unicode-console
PYTHONIOENCODING = UTF-8; python generate_summaries.py
但是,这没有帮助。
我一直在pyenv上使用python2.7。
您是否遇到过此类错误?您能提出我要解决的问题吗?