I've created a scraper with Scrapy and wxPython which works as expected, exporting a file with results to the desktop in CSV format. I'm attempting to package this into an executable with cx_Freeze using the below command prompt line:
cxfreeze ItemStatusChecker.py --target-dir dist
This seems to work fine, building the dist directory with ItemStatusChecker.exe
However, when I open ItemStatusChecker.exe, I get the below error in the command prompt and my GUI does not launch:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec code in m.__dict__
File "ItemStatusChecker.py", line 6, in <module>
File "C:\Python27\lib\site-packages\scrapy\__init__.py", line 6, in <module>
__version__ = pkgutil.get_data(__package__, 'VERSION').strip()
File "C:\Python27\lib\pkgutil.py", line 591, in get_data
return loader.get_data(resource_name_)
IOError: [Errno 2] No such file or directory: 'scrapy\\VERSION'
I've tried running it through py2exe as well. This also seems to work fine, creating the dist directory, but I get a very similar error when trying to launch the exe:
Traceback (most recent call last):
File "ItemStatusChecker.py", line 6, in <module>
File "scrapy\__init__.pyc", line 6, in <module>
File "pkgutil.pyc", line 591, in get_data
IOError: [Errno 2] No such file or directory: 'scrapy\\VERSION'
I'm a python newbie, so let me know if I left out any necessary details. Thank you in advance for any advice you can offer!