Skip to content

tox fails all setup on MacOS (subprocess-exited-with-error) #2330

@martimors

Description

@martimors

Describe your environment
I'm following this guide. I've contributed a feature and would like to run two unit tests. Seems to me the way to go is to run every single test, on multiple python versions, but I find this excessive when my feature scope is so small (after all isn't this what CI is for).

I'm using a venv with python 3.11.5 for tox.

Steps to reproduce

# On MacOS with python3 version 
tox

What is the expected behavior?
Tests running

What is the actual behavior?
Perpetual error loop (repeating for each and every package)

py310-test-instrumentation-logging run-test-pre: commands[1] | pip install 'opentelemetry-api[test]@git+https://github.com/open-telemetry/opentelemetry-python.git@main\'
Looking in indexes: https://pypi.org/simple
Collecting opentelemetry-api@ git+https://github.com/open-telemetry/opentelemetry-python.git@main\ (from opentelemetry-api[test]@ git+https://github.com/open-telemetry/opentelemetry-python.git@main\)
  Cloning https://github.com/open-telemetry/opentelemetry-python.git (to revision main\) to /private/var/folders/gd/1kc4k75s6rz8hbxxvm40x5hr0000gp/T/pip-install-bgbs2tgk/opentelemetry-api_c93765d9e12e444fa91fd962d6422181
  Running command git clone --filter=blob:none --quiet https://github.com/open-telemetry/opentelemetry-python.git /private/var/folders/gd/1kc4k75s6rz8hbxxvm40x5hr0000gp/T/pip-install-bgbs2tgk/opentelemetry-api_c93765d9e12e444fa91fd962d6422181
  WARNING: Did not find branch or tag 'main\', assuming revision or ref.
  Running command git checkout -q 'main\'
  error: pathspec 'main\' did not match any file(s) known to git
  error: subprocess-exited-with-error

  × git checkout -q 'main\' did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git checkout -q 'main\' did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: InvocationError for command /Users/lol/repos/opentelemetry-python-contrib/.tox/py310-test-instrumentation-logging/bin/pip install 'opentelemetry-api[test]@git+https://github.com/open-telemetry/opentelemetry-python.git@main\' (exited with code 1)
py311-test-instrumentation-logging create: /Users/lol/repos/opentelemetry-python-contrib/.tox/py311-test-instrumentation-logging
py311-test-instrumentation-logging installdeps: -cdev-requirements.txt, pytest, pytest-benchmark
py311-test-instrumentation-logging installed: attrs==23.2.0,iniconfig==2.0.0,packaging==23.2,pluggy==1.4.0,py==1.11.0,py-cpuinfo==9.0.0,pytest==7.1.3,pytest-benchmark==4.0.0,tomli==2.0.1
py311-test-instrumentation-logging run-test-pre: PYTHONHASHSEED='3436851785'
py311-test-instrumentation-logging run-test-pre: commands[0] | python -m pip install -U pip setuptools wheel
Looking in indexes: https://pypi.org/simple
Requirement already satisfied: pip in /Users/lolrepos/opentelemetry-python-contrib/.tox/py311-test-instrumentation-logging/lib/python3.11/site-packages (24.0)
Requirement already satisfied: setuptools in /Users/lol/repos/opentelemetry-python-contrib/.tox/py311-test-instrumentation-logging/lib/python3.11/site-packages (69.1.0)
Collecting setuptools
  Using cached setuptools-69.1.1-py3-none-any.whl.metadata (6.2 kB)
Requirement already satisfied: wheel in /Users/lol/repos/opentelemetry-python-contrib/.tox/py311-test-instrumentation-logging/lib/python3.11/site-packages (0.42.0)
Using cached setuptools-69.1.1-py3-none-any.whl (819 kB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 69.1.0
    Uninstalling setuptools-69.1.0:
      Successfully uninstalled setuptools-69.1.0
Successfully installed setuptools-69.1.1

Additional context
I just want to run two unit tests, I should not have to run every single test locally in a tool that my IDE doesn't support (tox).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions