python-2.7


Python 2.7 Spynner cx_Freeze


I've ran into a problem while freezing my Python 2.7 super simple script into a standalone application.
I'm using Spynner with no problems at all, however when I try to freeze my super simple script:
from spynner import *
I get these following errors when I open "test.exe" in CMD:
C:\Python27\Scripts\MY\build\exe.win32-2.7>test.exe
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", li
exec code in m.__dict__
File "test.py", line 1, in <module>
File "C:\Python27\lib\site-packages\spynner-2.4-py2.7.egg\spynner\__init_
from browser import *
File "C:\Python27\lib\site-packages\spynner-2.4-py2.7.egg\spynner\browser
class Browser(object):
File "C:\Python27\lib\site-packages\spynner-2.4-py2.7.egg\spynner\browser
pkg_resources.resource_filename('spynner', 'javascript'),
File "build/bdist.linux-i686/egg/pkg_resources.py", line 882, in resource
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1344, in get_res
NotImplementedError: resource_filename() only supported for .egg, not .zip
Thanks in advance for any ideas.
I have same issue, and I solved, share my solution,
I change spynner module source code "browser.py" line 77
class Browser(object):
"""
Stateful programmatic web browser class based upon QtWebKit.
"""
errorCode = None
errorMessage = None
if hasattr(sys, "frozen"):
Handle_Frozen_Location = os.path.join(os.path.dirname(sys.executable), 'javascript')
else:
Handle_Frozen_Location = pkg_resources.resource_filename('spynner', 'javascript')
_javascript_directories = [Handle_Frozen_Location, ]
_jquery = 'jquery-1.5.2.js'
_jquery_simulate = 'jquery.simulate.js'
#.....# all the same
than copy javascript folder from C:\Python27\Lib\site-packages\spynner-2.15-py2.7.egg\spynner
(above is windows path...) in to your build folder like c:\somewhere\build\exe.win32-2.7
Hope can solved your problem...

Related Links

Install matlibplot widget plugin on Ubuntu Qtdesigner4
How to compare most common words in on text file to other text file
Selenium Python Using JavaScript to click link can i put it inside WebdriverWait
Scipy installation cygwin64 Windows10 fails at late stage
Moving files to specific keys within buckets with Python & boto
How to not accept blank and space only raw_input reply in python?
Error while upgrading to pip 7.1.10 on Windows 8.1 (python 2.7)
How could i deselect checkbox?
Python virtualbox api cannot add disk to SATA controller
Filter spatial view response in couchbase
How to find unique values in python list
Automatically strip the number in front of python codes when pasting
Compare two CSV files in Python
Printing records for custom module
Pickle Hangs with PyPy
ipython throws EOFError

Categories

HOME
google-chrome
xpath
apache-nifi
blast
angular-ui-grid
long-integer
scroll
activex
jersey-2.0
bittorrent
selection
elastic-load-balancer
buffer
android-externalstorage
fresco
pygobject
rpmbuild
deepfreeze
clr
activeadmin
weex
amazon-sns
nurbs
android-service
google-play-developer-api
fotorama
serversocket
directfb
subclassing
ftp-server
stackpanel
xvfb
unification
hidden-markov-models
text-decorations
selenide
jacoco-maven-plugin
classnotfoundexception
git-tfs
type-inference
sigsegv
nslayoutconstraint
asp.net-web-api-routing
mongodb-aggregation
alertify
dynamics-crm-4
openerp-6
bpms
petsc
controllers
clp
p6spy
conan
android-4.2-jelly-bean
declarative
fiber
node.js-connect
android-expansion-files
flush
myfaces
textpattern
calcite
apple
postal-code
com0com
fuseesb
prism-4
mgwt
kognitio-wx2
password-recovery
rubber
angular-ui-select
prism.js
miglayout
tabletools
ivalueconverter
cpu-time
profiles
django-settings
compiler-flags
visual-c++-2005
quickgraph
insertion
xs
delphi-xe4
mongo-jackson-mapper
session-0-isolation
simplecov
daap
playorm
clearinterval
java.lang.class
kobold2d
nsfont
background-repeat
dynamic-c
glassfish-esb
kernel32
pyjamas
turbine
ixmldomdocument
aspbutton
firephp
index.dat

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile