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
run pytest with seleniumbase failed: "argparse.ArgumentError: argument --headless: conflicting option string: --headless" #1069
Comments
Hi @matthewxuda, |
thank you veru much, I installed selenium base and pytest-bdd a few days ago. It can still work with pytest a few days ago, but it doesn't work today. I don't know why. It has been uninstalled and reinstalled several times, but it can't work,I just uninstall all pytest and pytest plugin, and reinstall seleniumbase, but it not only install the seleniumbase, but also install many other modules, it show me and I run pytest again, i meet the same problem like before, and i down't know which plugin will create the --headless option, if i know, i will uninstall allof them, can you help me, thanks again. |
@matthewxuda Run |
$ pytest -h |
when i run pytest -h, it still show the error info |
@matthewxuda Try uninstalling seleniumbase and then running |
usage: pytest [options] [file_or_dir] [file_or_dir] [...] positional arguments: general: reporting: pytest-warnings: collection: test session debugging and configuration: logging: re-run failing tests to eliminate flaky failures: distributed and subprocess testing: Dash Integration Tests: forked subprocess test execution: custom options: [pytest] ini-options in the first pytest.ini|tox.ini|setup.cfg file found: markers (linelist): markers for test functions environment variables: to see available markers type: pytest --markers |
1 similar comment
usage: pytest [options] [file_or_dir] [file_or_dir] [...] positional arguments: general: reporting: pytest-warnings: collection: test session debugging and configuration: logging: re-run failing tests to eliminate flaky failures: distributed and subprocess testing: Dash Integration Tests: forked subprocess test execution: custom options: [pytest] ini-options in the first pytest.ini|tox.ini|setup.cfg file found: markers (linelist): markers for test functions environment variables: to see available markers type: pytest --markers |
this is the information when i run pytest -h, and how to get the other conflict is, thanks a lot |
@matthewxuda "Dash Integration Tests" is causing the conflict. You need to uninstall the following:
|
Oh, My God, thanks a lot again, it works, thank you very much :) |
1 similar comment
Oh, My God, thanks a lot again, it works, thank you very much :) |
I've got the same problem but wanted to use seleniumbase to test my dash app. Thanks in advance, and apologies if I've missed something obvious. |
@docsteveharris It's possible: You just need to install seleniumbase in a separate Python virtual environment from dash, as they both define Alternatively, you could run seleniumbase tests using |
thanks |
######## issues ########################################################
$pytest
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/pytest", line 8, in
sys.exit(console_main())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/init.py", line 185, in console_main
code = main()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/init.py", line 143, in main
config = _prepareconfig(args, plugins)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/init.py", line 318, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pluggy/_callers.py", line 55, in _multicall
gen.send(outcome)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/helpconfig.py", line 100, in pytest_cmdline_parse
config: Config = outcome.get_result()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
res = hook_impl.function(*args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/init.py", line 1003, in pytest_cmdline_parse
self.parse(args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/init.py", line 1283, in parse
self._preparse(args, addopts=addopts)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/init.py", line 1175, in _preparse
self.known_args_namespace = self._parser.parse_known_args(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/argparsing.py", line 146, in parse_known_args
return self.parse_known_and_unknown_args(args, namespace=namespace)[0]
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/argparsing.py", line 155, in parse_known_and_unknown_args
optparser = self._getparser()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/argparsing.py", line 122, in _getparser
arggroup.add_argument(*n, **a)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/argparse.py", line 1386, in add_argument
return self._add_action(action)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/argparse.py", line 1590, in _add_action
action = super(_ArgumentGroup, self)._add_action(action)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/argparse.py", line 1400, in _add_action
self._check_conflict(action)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/argparse.py", line 1539, in _check_conflict
conflict_handler(action, confl_optionals)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/argparse.py", line 1548, in _handle_conflict_error
raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --headless: conflicting option string: --headless
########################################################################################
######### my pip list #######################################################################
########################################################################################
$ pip list
Package Version
akshare 1.0.87
alembic 1.7.4
allure-pytest 2.9.45
allure-python-commons 2.9.45
amqp 5.0.6
apin 1.1.3
apispec 3.3.2
appdirs 1.4.4
Appium-Python-Client 1.2.0
appnope 0.1.2
APScheduler 3.6.3
asgiref 3.2.7
assertpy 1.1
astor 0.8.1
astroid 2.4.0
async-generator 1.10
atomicwrites 1.3.0
attrs 21.2.0
Automat 20.2.0
Babel 2.9.1
backcall 0.2.0
backoff 1.11.1
backports.entry-points-selectable 1.1.0
baostock 0.8.8
bcrypt 3.2.0
beautifulsoup4 4.10.0
behave 1.2.6
billiard 3.6.4.0
bitstring 3.1.9
bleach 4.1.0
boto 2.49.0
boto3 1.12.16
botocore 1.15.16
Brotli 1.0.9
bs4 0.0.1
celery 5.1.2
certifi 2021.10.8
cffi 1.15.0
chardet 4.0.0
charset-normalizer 2.0.7
click 8.0.3
click-didyoumean 0.3.0
click-plugins 1.1.1
click-repl 0.2.0
colorama 0.4.4
commonmark 0.9.1
compare 0.2b0
ConfigArgParse 1.2.1
configparser 5.0.0
constantly 15.1.0
contextlib2 21.6.0
coreapi 2.3.3
coreschema 0.0.4
croniter 1.0.15
crypto 1.4.1
cryptography 35.0.0
cssselect 1.1.0
cycler 0.10.0
dash 2.0.0
dash-bootstrap-components 1.0.0
dash-colorscales 0.0.4
dash-core-components 2.0.0
dash-daq 0.5.0
dash-html-components 2.0.0
dash-table 5.0.0
ddt 1.3.1
decorator 5.1.0
defusedxml 0.7.1
demjson 2.2.4
diff-match-patch 20181111
distlib 0.3.3
Django 2.0.2
django-cors-headers 2.1.0
django-crispy-forms 1.7.2
django-filter 2.2.0
django-formtools 2.1
django-import-export 1.0.0
django-rest-swagger 2.1.2
django-reversion 2.0.13
django-suit 2.0a1
djangorestframework 3.7.7
dnspython 2.1.0
docutils 0.15.2
dtable 0.0.5
edict 0.51
elist 0.4.65
email-validator 1.1.3
et-xmlfile 1.0.1
execnet 1.9.0
Faker 8.11.0
fasteners 0.16.3
filelock 3.3.2
Flask 2.0.2
Flask-AppBuilder 3.3.4
Flask-Babel 2.0.0
Flask-Caching 1.10.1
Flask-Compress 1.10.1
Flask-JWT-Extended 3.25.1
Flask-Migrate 3.1.0
flask-ngrok 0.0.25
Flask-OpenID 1.3.0
Flask-Script 2.0.6
Flask-SQLAlchemy 2.5.1
func-timeout 4.3.5
future 0.18.2
fuzzywuzzy 0.18.0
gensim 3.8.1
geographiclib 1.52
geopy 2.2.0
get 2019.4.13
gevent 1.5a3
geventhttpclient-wheels 1.3.1.dev2
glob2 0.7
greenlet 0.4.15
h11 0.12.0
html5lib 1.1
htmlmin 0.1.12
humanize 3.12.0
hyperlink 19.0.0
idna 3.3
ImageHash 4.2.1
importlib-metadata 4.8.1
importlib-resources 5.3.0
incremental 17.5.0
iniconfig 1.1.1
install 1.3.4
int-date 0.1.8
ipdb 0.13.9
ipython 7.29.0
isodate 0.6.0
isort 4.3.21
itsdangerous 2.0.1
itypes 1.1.0
jdcal 1.4.1
jedi 0.18.0
jieba 0.42.1
Jinja2 3.0.2
jmespath 0.10.0
joblib 1.1.0
jsonpath 0.82
jsonschema 3.2.0
kaleido 0.2.1
kiwisolver 1.3.1
kombu 5.1.0
lazy-object-proxy 1.4.3
locustio 0.14.5
lxml 4.4.1
lz4 3.1.3
Mako 1.1.5
Markdown 3.2.1
MarkupSafe 2.0.1
marshmallow 3.14.0
marshmallow-enum 1.5.1
marshmallow-sqlalchemy 0.26.1
matplotlib 3.4.2
matplotlib-inline 0.1.3
mccabe 0.6.1
missingno 0.4.2
more-itertools 8.11.0
MouseInfo 0.1.3
msgpack 0.6.2
multimethod 1.6
Naked 0.1.31
networkx 2.6.3
nose 1.3.7
numpy 1.21.3
openapi-codec 1.3.2
openpyxl 3.0.7
osxmetadata 0.99.33
outcome 1.1.0
packaging 21.2
pandas 1.3.4
parameterized 0.8.1
paramiko 2.7.2
parse 1.19.0
parse-type 0.5.2
parsedatetime 2.6
parsel 1.5.2
parso 0.8.2
pathlib2 2.3.6
patsy 0.5.2
pdfminer.six 20211012
pexpect 4.8.0
phik 0.12.0
pickleshare 0.7.5
Pillow 8.4.0
pip 21.3.1
pipenv 2021.5.29
platformdirs 2.4.0
plotly 5.3.1
pluggy 1.0.0
poium 1.0.2
polyline 1.4.0
post 2019.4.13
ppscore 1.2.0
prison 0.2.1
prompt-toolkit 3.0.22
Protego 0.1.16
psutil 5.7.0
ptyprocess 0.7.0
public 2019.4.13
py 1.11.0
py-applescript 1.0.2
py-mini-racer 0.6.0
pyarrow 5.0.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
PyAutoGUI 0.9.53
pycparser 2.21
pydantic 1.8.2
PyDispatcher 2.0.5
PyGetWindow 0.0.9
Pygments 2.10.0
PyHamcrest 2.0.2
PyJWT 1.7.1
pylint 2.5.0
PyMsgBox 1.0.9
PyMySQL 1.0.2
PyNaCl 1.4.0
pynput 1.7.4
pyobjc 7.3
pyobjc-core 7.3
pyobjc-framework-Accounts 7.3
pyobjc-framework-AddressBook 7.3
pyobjc-framework-AdSupport 7.3
pyobjc-framework-AppleScriptKit 7.3
pyobjc-framework-AppleScriptObjC 7.3
pyobjc-framework-ApplicationServices 7.3
pyobjc-framework-Automator 7.3
pyobjc-framework-AVFoundation 7.3
pyobjc-framework-AVKit 7.3
pyobjc-framework-BusinessChat 7.3
pyobjc-framework-CalendarStore 7.3
pyobjc-framework-CFNetwork 7.3
pyobjc-framework-CloudKit 7.3
pyobjc-framework-Cocoa 7.3
pyobjc-framework-Collaboration 7.3
pyobjc-framework-ColorSync 7.3
pyobjc-framework-Contacts 7.3
pyobjc-framework-ContactsUI 7.3
pyobjc-framework-CoreAudio 7.3
pyobjc-framework-CoreAudioKit 7.3
pyobjc-framework-CoreBluetooth 7.3
pyobjc-framework-CoreData 7.3
pyobjc-framework-CoreLocation 7.3
pyobjc-framework-CoreMedia 7.3
pyobjc-framework-CoreMediaIO 7.3
pyobjc-framework-CoreMIDI 7.3
pyobjc-framework-CoreML 7.3
pyobjc-framework-CoreServices 7.3
pyobjc-framework-CoreSpotlight 7.3
pyobjc-framework-CoreText 7.3
pyobjc-framework-CoreWLAN 7.3
pyobjc-framework-CryptoTokenKit 7.3
pyobjc-framework-DictionaryServices 7.3
pyobjc-framework-DiscRecording 7.3
pyobjc-framework-DiscRecordingUI 7.3
pyobjc-framework-DiskArbitration 7.3
pyobjc-framework-DVDPlayback 7.3
pyobjc-framework-EventKit 7.3
pyobjc-framework-ExceptionHandling 7.3
pyobjc-framework-ExternalAccessory 7.3
pyobjc-framework-FinderSync 7.3
pyobjc-framework-FSEvents 7.3
pyobjc-framework-GameCenter 7.3
pyobjc-framework-GameController 7.3
pyobjc-framework-GameKit 7.3
pyobjc-framework-GameplayKit 7.3
pyobjc-framework-ImageCaptureCore 7.3
pyobjc-framework-IMServicePlugIn 7.3
pyobjc-framework-InputMethodKit 7.3
pyobjc-framework-InstallerPlugins 7.3
pyobjc-framework-InstantMessage 7.3
pyobjc-framework-Intents 7.3
pyobjc-framework-IOSurface 7.3
pyobjc-framework-iTunesLibrary 7.3
pyobjc-framework-LatentSemanticMapping 7.3
pyobjc-framework-LaunchServices 7.3
pyobjc-framework-libdispatch 7.3
pyobjc-framework-LocalAuthentication 7.3
pyobjc-framework-MapKit 7.3
pyobjc-framework-MediaAccessibility 7.3
pyobjc-framework-MediaLibrary 7.3
pyobjc-framework-MediaPlayer 7.3
pyobjc-framework-MediaToolbox 7.3
pyobjc-framework-Metal 7.3
pyobjc-framework-MetalKit 7.3
pyobjc-framework-MetalPerformanceShaders 7.3
pyobjc-framework-ModelIO 7.3
pyobjc-framework-MultipeerConnectivity 7.3
pyobjc-framework-NaturalLanguage 7.3
pyobjc-framework-NetFS 7.3
pyobjc-framework-Network 7.3
pyobjc-framework-NetworkExtension 7.3
pyobjc-framework-NotificationCenter 7.3
pyobjc-framework-OpenDirectory 7.3
pyobjc-framework-OSAKit 7.3
pyobjc-framework-Photos 7.3
pyobjc-framework-PhotosUI 7.3
pyobjc-framework-PreferencePanes 7.3
pyobjc-framework-Quartz 7.3
pyobjc-framework-SafariServices 7.3
pyobjc-framework-SceneKit 7.3
pyobjc-framework-ScreenSaver 7.3
pyobjc-framework-ScriptingBridge 7.3
pyobjc-framework-SearchKit 7.3
pyobjc-framework-Security 7.3
pyobjc-framework-SecurityFoundation 7.3
pyobjc-framework-SecurityInterface 7.3
pyobjc-framework-ServiceManagement 7.3
pyobjc-framework-Social 7.3
pyobjc-framework-SpriteKit 7.3
pyobjc-framework-StoreKit 7.3
pyobjc-framework-SyncServices 7.3
pyobjc-framework-SystemConfiguration 7.3
pyobjc-framework-UserNotifications 7.3
pyobjc-framework-VideoSubscriberAccount 7.3
pyobjc-framework-VideoToolbox 7.3
pyobjc-framework-Vision 7.3
pyobjc-framework-WebKit 7.3
pyOpenSSL 21.0.0
pyotp 2.6.0
pyparsing 2.4.6
pyperclip 1.8.2
pypinyin 0.36.0
PyQt5 5.15.6
PyQt5-Qt5 5.15.2
PyQt5-sip 12.9.0
PyQtWebEngine 5.15.5
PyQtWebEngine-Qt5 5.15.2
PyRect 0.1.4
pyrsistent 0.18.0
PyScreeze 0.1.28
pytab 1.0.4
pytesseract 0.3.8
pytest 6.2.5
pytest-bdd 4.1.0
pytest-forked 1.3.0
pytest-html 2.0.1
pytest-metadata 1.11.0
pytest-ordering 0.6
pytest-parallel 0.1.1
pytest-rerunfailures 10.2
pytest-xdist 2.4.0
python-crontab 2.2.8
python-dateutil 2.8.0
python-docx 0.8.6
python-engineio 3.11.2
python-geohash 0.8.5
python-socketio 4.4.0
python3-openid 3.2.0
pytweening 1.0.4
pytz 2017.3
PyWavelets 1.1.1
PyYAML 6.0
pyzmq 18.1.0
qtstylish 0.1.5
query-string 2019.4.13
queuelib 1.5.0
redis 2.10.6
redis-py-cluster 2.1.0
request 2019.4.13
requests 2.26.0
requests-toolbelt 0.9.1
retry 0.9.2
rich 10.13.0
rsa 4.7.2
ruamel.yaml 0.16.12
ruamel.yaml.clib 0.2.6
rubicon-objc 0.4.1
s3transfer 0.3.3
sbvirtualdisplay 1.0.0
scikit-learn 0.24.2
scipy 1.7.1
Scrapy 2.0.0
seaborn 0.11.2
seldom 2.2.4
selenium 4.0.0
seleniumbase 2.1.5
service-identity 18.1.0
setuptools 58.5.3
setuptools-scm 6.3.2
shellescape 3.8.1
simplejson 3.17.2
six 1.16.0
sklearn 0.0
smart-open 1.9.0
sniffio 1.2.0
sortedcontainers 2.4.0
soupsieve 2.3
SQLAlchemy 1.3.13
SQLAlchemy-Utils 0.37.9
sqlparse 0.3.1
squarify 0.4.3
statsmodels 0.13.0
stockstats 0.3.2
strsimpy 0.2.1
superset 0.30.1
tablib 1.1.0
tabulate 0.8.9
tangled-up-in-unicode 0.2.0
tblib 1.7.0
tenacity 8.0.1
text-unidecode 1.3
threadpoolctl 3.0.0
tlist 0.6
toml 0.10.2
tomli 1.2.2
tornado 6.1
tqdm 4.61.0
traitlets 5.1.1
trio 0.19.0
trio-websocket 0.9.2
tushare 1.2.62
Twisted 19.10.0
typing-extensions 3.10.0.2
tzlocal 2.0.0
unittest-xml-reporting 3.0.4
uritemplate 3.0.1
urllib3 1.26.7
vine 5.0.0
virtualenv 20.10.0
virtualenv-clone 0.5.7
visions 0.7.4
w3lib 1.21.0
wcwidth 0.1.9
webencodings 0.5.1
websocket-client 0.57.0
Werkzeug 2.0.2
wheel 0.37.0
wordcloud 1.8.1
wrapt 1.12.1
wsproto 1.0.0
WTForms 2.3.3
WTForms-JSON 0.3.3
xarray 0.20.0
xattr 0.9.7
xlrd 1.2.0
XlsxWriter 1.0.5
zipp 3.6.0
zope.interface 4.7.1
pytest and operating system versions
pytest-6.2.5
seleniumbase 2.1.5
MacBook Air (Retina, 13-inch, 2019)
1.6 GHz Intel Core i5
8 GB 2133 MHz LPDDR3
Intel UHD Graphics 617 1536 MB
The text was updated successfully, but these errors were encountered: