1

I'm getting the following error when i try to run the python code File_1.py actually import File_2.py to call the function.

Traceback (most recent call last):
File "File_1.py", line 1, in <module>
import File_2
File "/home/eduser/shashank/File_2.py", line 8, in <module>
display = Display(visible=0, size=(800, 600))
File "/usr/local/lib/python2.7/dist-packages/pyvirtualdisplay/display.py", 
line 34, in __init__
self._obj = self.display_class(
File "/usr/local/lib/python2.7/dist-packages/pyvirtualdisplay/display.py", 
line 52, in display_class
cls.check_installed()
File "/usr/local/lib/python2.7/dist-packages/pyvirtualdisplay/xvfb.py", line 
38, in check_installed
ubuntu_package=PACKAGE).check_installed()
File "/usr/local/lib/python2.7/dist-packages/easyprocess/__init__.py", line 
180, in check_installed
raise EasyProcessCheckInstalledError(self)
easyprocess.EasyProcessCheckInstalledError: cmd=['Xvfb', '-help']
OSError=None
Program install error!

here is the section of code to which the error points

import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import File_3_1

from pyvirtualdisplay import Display

display = Display(visible=0, size=(800, 600))
display.start()

Any help will be appreciated.

1 Answers1

1

You might just need to have xvfv installed. Try:

sudo apt-get install xvfb xserver-xephyr vnc4server

See: http://pyvirtualdisplay.readthedocs.io/en/latest/#installation

Arya McCarthy
  • 8,554
  • 4
  • 34
  • 56
ums532
  • 11
  • 1