question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--alluredir gives error: option names set(['--alluredir']) already added

See original GitHub issue

I’m submitting a …

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

py.test --alluredir=FOO fails for me

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

I have a reasonably complicated conftest.py, but all the other plugins seem to work.

What is the expected behavior?

No errors

What is the motivation / use case for changing the behavior?

Seems like #97, but I’m running latest beta with pip install allure-pytest==2.1.0b1 . Fresh virtualenv install, no previous history of allure.

Please tell us about your environment:

  • Allure version: 2.1.0
  • Test framework: pytest@3.0.5
  • Allure adaptor: allure-pytest@2.1.0b1

Other information

Stack Trace:

$ py.test -n 6 --alluredir=/my/home/allure/3 --verbose -p no:sugar --junit-xml=junit-api-test-2.xml testcases/test_1.py testcases/test_2.py
Traceback (most recent call last):
File "/my/bin/py.test", line 11, in <module>
  sys.exit(main())
File "/my/lib/python2.7/site-packages/_pytest/config.py", line 47, in main
  config = _prepareconfig(args, plugins)
File "/my/lib/python2.7/site-packages/_pytest/config.py", line 156, in _prepareconfig
  pluginmanager=pluginmanager, args=args)
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
  return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
  return self._inner_hookexec(hook, methods, kwargs)
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
  _MultiCall(methods, kwargs, hook.spec_opts).execute()
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
  return _wrapped_call(hook_impl.function(*args), self.execute)
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 250, in _wrapped_call
  wrap_controller.send(call_outcome)
File "/my/lib/python2.7/site-packages/_pytest/helpconfig.py", line 32, in pytest_cmdline_parse
  config = outcome.get_result()
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 280, in get_result
  _reraise(*ex)  # noqa
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
  self.result = func()
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
  res = hook_impl.function(*args)
File "/my/lib/python2.7/site-packages/_pytest/config.py", line 910, in pytest_cmdline_parse
  self.parse(args)
File "/my/lib/python2.7/site-packages/_pytest/config.py", line 1067, in parse
  self._preparse(args, addopts=addopts)
File "/my/lib/python2.7/site-packages/_pytest/config.py", line 1029, in _preparse
  self.pluginmanager.load_setuptools_entrypoints(entrypoint_name)
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 516, in load_setuptools_entrypoints
  self.register(plugin, name=ep.name)
File "/my/lib/python2.7/site-packages/_pytest/config.py", line 250, in register
  ret = super(PytestPluginManager, self).register(plugin, name)
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 371, in register
  hook._maybe_apply_history(hookimpl)
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 768, in _maybe_apply_history
  res = self._hookexec(self, [method], kwargs)
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
  return self._inner_hookexec(hook, methods, kwargs)
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
  _MultiCall(methods, kwargs, hook.spec_opts).execute()
File "/my/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
  res = hook_impl.function(*args)
File "/my/lib/python2.7/site-packages/allure_pytest/plugin.py", line 19, in pytest_addoption
  help="Generate Allure report in the specified directory (may not exist)")
File "/my/lib/python2.7/site-packages/_pytest/config.py", line 733, in addoption
  raise ValueError("option names %s already added" % conflict)
ValueError: option names set(['--alluredir']) already added

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Sanmejiecommented, Jan 31, 2019

I uninstall pytest-allure-adapter, then it works fine too

0reactions
vimuhacommented, Jul 12, 2021

i have the same positive result as @Sanmejie . Good Luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: option names already added pytest - Stack Overflow
I am getting the following error, can anybody help? File "c:\users\g702823\appdata\local\continuum1\anaconda3\lib\site-packages\_pytest\config\ ...
Read more >
allure-framework/allure-core - Gitter
I am getting this error while trying to build a job in jenkins with ... ValueError: option names set(['--alluredir']) already added".
Read more >
valueerror: option names {'--alluredir'} already added
Implementing this hook from conftest.py files is strongly discouraged because conftest.py files are lazily loaded and may give strange unknown option errors ......
Read more >
ValueError: option names {'--alluredir'} already added - 简书
pytest-allure-adaptor与allure-pytest的alluredir都被引用造成冲突pip3 uninstall allure-pytestmodule...
Read more >
Allure Framework
You have an option now to mark such tests in a special way, ... during the test execution simply add --alluredir option and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found