You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thanks for the awesome wrapper!
I'm getting the below error running dryscrape with xvfbwrapper.
Ubuntu 16.04.2 LTS (Ubuntu Mate)
Python 2.7.12
xvfbwrapper-0.2.9
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/local/lib/python2.7/dist-packages/xvfbwrapper.py", line 84, in stop
del os.environ['DISPLAY']
File "/usr/lib/python2.7/os.py", line 498, in delitem
del self.data[key]
KeyError: 'DISPLAY'
I'm not sure this is the best solution, but I was able to fix this by adding "if 'DISPLAY' in os.environ:" to check that 'DISPLAY' actually exists.
if self.orig_display is None:
if 'DISPLAY' in os.environ:
del os.environ['DISPLAY']
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for the awesome wrapper!
I'm getting the below error running dryscrape with xvfbwrapper.
Ubuntu 16.04.2 LTS (Ubuntu Mate)
Python 2.7.12
xvfbwrapper-0.2.9
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/local/lib/python2.7/dist-packages/xvfbwrapper.py", line 84, in stop
del os.environ['DISPLAY']
File "/usr/lib/python2.7/os.py", line 498, in delitem
del self.data[key]
KeyError: 'DISPLAY'
I'm not sure this is the best solution, but I was able to fix this by adding "if 'DISPLAY' in os.environ:" to check that 'DISPLAY' actually exists.
The text was updated successfully, but these errors were encountered: