Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: 'Xvfb' #2

Open
liuxiaojiao opened this issue May 31, 2024 · 1 comment
Open

Comments

@liuxiaojiao
Copy link

Followed your instructions, got the correct version of chromedriver but got an error when processing
python3 main.py --main_category 'Web, Mobile & Software Dev' --output out.json

Process Process-41:
Traceback (most recent call last):
File "/Users/XXX/Library/Python/3.8/lib/python/site-packages/multiprocess/process.py", line 315, in _bootstrap
self.run()
File "/Users/XXX/Library/Python/3.8/lib/python/site-packages/multiprocess/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/Users/XXX/Documents/upwork-scraper-selenium-master/scraper/init.py", line 149, in _handle_job_list_page
disp = Display(visible=0, size=(1920, 1080))
File "/Users/XXX/Library/Python/3.8/lib/python/site-packages/pyvirtualdisplay/display.py", line 54, in init
self._obj = cls(
File "/Users/XXX/Library/Python/3.8/lib/python/site-packages/pyvirtualdisplay/xvfb.py", line 44, in init
AbstractDisplay.init(
File "/Users/XXX/Library/Python/3.8/lib/python/site-packages/pyvirtualdisplay/abstractdisplay.py", line 85, in init
helptext = get_helptext(program)
File "/Users/XXX/Library/Python/3.8/lib/python/site-packages/pyvirtualdisplay/util.py", line 13, in get_helptext
p = subprocess.Popen(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'Xvfb'

@ylink-lfs
Copy link
Owner

try using linux_depedencies_all_in_one.sh in the repository to install necessary dependencies under Linux including Xvfb, or you can use headless mode so that no display-related dependency is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants