I created a scraper with Scrapy and wxPython, which works as expected, exporting the results file to the desktop in CSV format. I am trying to pack it into an executable using cx_Freeze using the following command line:
cxfreeze ItemStatusChecker.py --target-dir dist
This seems to work fine by creating a dist directory using ItemStatusChecker.exe
However, when I open ItemStatusChecker.exe, I get the following error on the command line and my GUI does not start:
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 tried to run it through py2exe. This also works fine when creating the dist directory, but when I try to start exe I get a very similar error:
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'
python, , . , !