小编Kur*_*ert的帖子

WebDriverException:消息:服务 geckodriver 意外退出。状态代码为:在 FreeBSD 监狱中使用 Selenium Geckodriver Firefox 时出现 64 错误

对于一些测试,我设置了一个普通的新 TrueNAS 12.3 FreeBSD Jail 并启动它,然后安装python3firefoxgeckodriverpip使用以下命令:

pkg install python3 firefox geckodriver py38-pip
pip install --upgrade pip
setenv CRYPTOGRAPHY_DONT_BUILD_RUST 1
pip install cryptography==3.4.7
pip install selenium
Run Code Online (Sandbox Code Playgroud)

之后,当我想在 Python 代码中将 Selenium 与 Firefox 一起使用时,它不起作用:

from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = Options()
options.headless = True
driver = webdriver.Firefox(options=options)
Run Code Online (Sandbox Code Playgroud)

带来

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
    self.service.start()
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 98, …
Run Code Online (Sandbox Code Playgroud)

python selenium freebsd geckodriver selenium4

15
推荐指数
1
解决办法
3万
查看次数

备份多个文件夹(包括/排除)

我想用duplicity备份以下文件夹

/home
/etc
/usr/local
/root
/var
/boot
Run Code Online (Sandbox Code Playgroud)

并排除

/var/tmp
/var/run
/var/lock
/home/*/.thumbnails
/home/*/.cache
/home/*/.local/share/Trash
/root/.thumbnails
/root/.cache
/root/.local/share/Trash
Run Code Online (Sandbox Code Playgroud)

我已经知道我必须指定一个要保存的源目录,并且我可以使用includeexclude选项调整它.

所以,我可以/作为源目录和排除**(这将总结为什么),并包括我想要保存的文件夹.

来源/--exclude /将给予EN空集,--include ...击败exclude并添加文件夹.但是,我将无法排除我想要排除的文件夹,对吧?或者我错过了什么?

backup duplicity duplicity-backup

7
推荐指数
1
解决办法
5336
查看次数