Have been running a frozen script that uses newspaper to pull stories from a list of URLs that are in an xlsx file. I froze the script using PyInstaller about six weeks ago, and it had been running without issue up to today. Now today, the script throws this error and doesn't pull the title, date, or text from an article (but, oddly, still pulls the author just fine).
Couldn't open file /var/folders/cf/mzl9_yj13n5_k00z1cp6cbrc0000gn/T/_MEIhUhpM1/newspaper/resources/text/stopwords-en.txt
Tried running the original script locally in the virtual environment I used to develop it and it works just fine. Tried freezing it again with PyInstaller, and came back to the same problem.
Am really baffled by this one, especially given the script was working for over a month and then suddenly stopped.
Am on OSX 11.1
Python 3.7.0
newspaper3k 0.2.8
pyinstaller 4.1
After a LOT of trial and error, I was able to resolve by explicitly passing the module data through the "data" option in the SPEC file. Am closing this one.
Am really stumped by this one...
Have been running a frozen script that uses newspaper to pull stories from a list of URLs that are in an xlsx file. I froze the script using PyInstaller about six weeks ago, and it had been running without issue up to today. Now today, the script throws this error and doesn't pull the title, date, or text from an article (but, oddly, still pulls the author just fine).
Couldn't open file /var/folders/cf/mzl9_yj13n5_k00z1cp6cbrc0000gn/T/_MEIhUhpM1/newspaper/resources/text/stopwords-en.txt
Tried running the original script locally in the virtual environment I used to develop it and it works just fine. Tried freezing it again with PyInstaller, and came back to the same problem.
Am really baffled by this one, especially given the script was working for over a month and then suddenly stopped.
Am on OSX 11.1 Python 3.7.0 newspaper3k 0.2.8 pyinstaller 4.1