Skip to content

Module path (sys.path) confusion when coverage is installed in "system" pyenv #696

@arcivanov

Description

@arcivanov

Coverage 5.x is installed in <project>/.pybuilder/plugins/... but somehow it's not imported if coverage is installed in the system Python.

Likely sys.path order confusion integration pybuilder pyenv.

[DEBUG] Executing subtask of 'coverage' from 'pybuilder.plugins.python.coverage_plugin'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pybuilder/cli.py", line 468, in main
    environments=options.environments, tasks=arguments)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/reactor.py", line 235, in build
    execution_summary = self.build_execution_plan(tasks, execution_plan)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/reactor.py", line 274, in build_execution_plan
    reactor=self)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/execution.py", line 399, in execute_execution_plan
    summaries.append(self.execute_task(task, **kwargs))
  File "/usr/local/lib/python3.7/site-packages/pybuilder/execution.py", line 346, in execute_task
    task.execute(self.logger, kwargs, _executable=_executable)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/execution.py", line 187, in execute
    executable.execute(argument_dict)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/execution.py", line 101, in execute
    self.callable(*arguments)
  File "/usr/local/lib/python3.7/site-packages/pybuilder/plugins/python/coverage_plugin.py", line 133, in coverage
    cov = coverage_factory(**coverage_config)
TypeError: __init__() got an unexpected keyword argument 'context'
------------------------------------------------------------
BUILD FAILED - TypeError: __init__() got an unexpected keyword argument 'context' (pybuilder/plugins/python/coverage_plugin.py:133)
------------------------------------------------------------
Build finished at 2020-04-17 22:41:54
Build took 9 seconds (9571 ms)
$ pip show coverage
Name: coverage
Version: 4.5.4
Summary: Code coverage measurement for Python
Home-page: https://github.com/nedbat/coveragepy
Author: Ned Batchelder and 100 others
Author-email: ned@nedbatchelder.com
License: Apache 2.0
Location: /usr/lib64/python3.7/site-packages
Requires: 
Required-by: 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions