는 질문pyInstaller 중에 캔트 발견 거위 파일 경로가
왜 goose
파일을 작동하지 pyInstaller 중에 것인가? 실행 파일 작성자 나 코드에 문제가 있습니까?
코드
from goose.Goose import Goose
url =
'http://sociedad.elpais.com/sociedad/2012/10/27/actualidad/1351332873_157836.html'
g = Goose({'debug':False,'enableImageFetching': False,'localStoragePath':'./tmp'})
article = g.extractContent(url=url)
#article.title
print article.cleanedArticleText[:150].encode("utf8","ignore")
오류
내 프로그램은 pyInstaller 중에 만들어,이 경로에 거위 파일을 찾을 실패 pyInstaller 중에에서 로그 :
IOError: Couldn't open file C:\Users\user\Desktop\dist\main.exe?118272\goose/resources/text/stopwords-en.txt
이 발생 :
Traceback (most recent call last):
File "<string>", line 15, in <module>
File "C:\Users\user\Desktop\build\pyi.win32\main\out00-PYZ.pyz\goose.Goose",line 52, in extractContent
File "C:\Users\user\Desktop\build\pyi.win32\main\out00-PYZ.pyz\goose.Goose",line 59, in sendToActor
File "C:\Users\user\Desktop\build\pyi.win32\main\out00-PYZ.pyz\goose.Crawler", line 86, in crawl
File "C:\Users\user\Desktop\build\pyi.win32\main\out00-PYZ.pyz\goose.extractors", line 245, in calculateBestNodeBasedOnClustering
File "C:\Users\user\Desktop\build\pyi.win32\main\out00-PYZ.pyz\goose.text", line 97, in __init__
File "C:\Users\user\Desktop\build\pyi.win32\main\out00-PYZ.pyz\goose.utils",line 76, in loadResourceFile
IOError: Couldn't open file C:\Users\user\Desktop\dist\main.exe?118272\goose/resources/text/stopwords-en.txt
무엇이 잘못 되었습니까?
오류를 복사 할 수 있도록 Python 코드를 추가해 주시겠습니까? – xxmbabanexx
코드보기^dpaste –