I'm using py2exe to compile a Python 2.7 script that uses Selenium 2.39.0 to open up Firefox windows and carry out some routines. In the past, I've been able to compile the code without any issue. Today though, after updating from Selenium 2.35 to 2.39, I'm running into trouble. When I try to run the .exe generated by the compiled code, I get the following error:
Exception in Tkinter callback
Traceback (most recent call last):
File "Tkinter.pyo", line 1410, in __call__
File "literatureonlineapi2.5.5.py", line 321, in startapi
File "seleniumwebdriverfirefoxwebdriver.pyo", line 43, in __init__
File "seleniumwebdriverfirefoxfirefox_profile.pyo", line 58, in __init__
IOError: [Errno 2] No such file or directory: 'C:\Text\Professional\Digital H
umanities\Programming Languages\Python\Query Literature Online\LION 1.0\2.5
\2.5.5\dist\.\selenium\webdriver\firefox\webdriver_prefs.json'
Here we go!
Exception in Tkinter callback
Traceback (most recent call last):
File "Tkinter.pyo", line 1410, in __call__
File "literatureonlineapi2.5.5.py", line 321, in startapi
File "seleniumwebdriverfirefoxwebdriver.pyo", line 43, in __init__
File "seleniumwebdriverfirefoxfirefox_profile.pyo", line 58, in __init__
IOError: [Errno 2] No such file or directory: 'C:\Text\Professional\Digital H
umanities\Programming Languages\Python\Query Literature Online\LION 1.0\2.5
\2.5.5\dist\.\selenium\webdriver\firefox\webdriver_prefs.json'
(This error does not appear when I run the uncompiled code.)
I came across a google code page that led me to believe newer versions of Selenium have had trouble with this missing webdriver_prefs.json file, but that didn't help me sort out the problem.
Does anyone know how I might manually provide the missing file? I would be grateful for any help others can offer.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…