Description
error log:
#======================
(base) PS D:\Users\xxx\PycharmProjects\test\dist> .\main.exe
Traceback (most recent call last):
File "goose3\utils_init_.py", line 45, in loadResourceFile
File "codecs.py", line 905, in open
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\xxx\AppData\Local\Temp\_MEI201362\goose3\resources\images\known-image-css.txt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 18, in
File "main.py", line 12, in print_hi
File "goose3_init_.py", line 121, in extract
File "goose3_init_.py", line 149, in crawl
File "goose3_init.py", line 135, in crawler_wrapper
File "goose3\crawler.py", line 123, in init
File "goose3\crawler.py", line 312, in get_image_extractor
File "goose3\extractors\images.py", line 57, in init
File "goose3\extractors\images.py", line 410, in load_customesite_mapping
File "goose3\utils_init.py", line 49, in loadResourceFile
OSError: Couldn't open file C:\Users\xxx\AppData\Local\Temp_MEI201362\goose3\resources\images\known-image-css.txt
[7344] Failed to execute script 'main' due to unhandled exception!
#======================
code main.py:
#======================
from goose3 import Goose
from goose3.text import StopWordsChinese
if name == 'main':
url = 'https://www.ruiwen.com/word/ganjingzhiyuwenanduanju.html'
g = Goose({'stopwords_class': StopWordsChinese})
article = g.extract(url=url)
print(article.cleaned_text[:150])
#======================
it run well in pycharm project.
goose3 3.1.12
pyinstaller 5.4.1
pip 22.2.2
python 3.10.6