Skip to content
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

[BUG] is not in the subpath of #705

Open
sbrunner opened this issue Dec 24, 2024 · 0 comments · May be fixed by #706
Open

[BUG] is not in the subpath of #705

sbrunner opened this issue Dec 24, 2024 · 0 comments · May be fixed by #706
Labels

Comments

@sbrunner
Copy link
Member

Occasionally, we get these exceptions

 Traceback (most recent call last):
  File "/venv/bin/prospector", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/venv/lib/python3.12/site-packages/prospector/run.py", line 201, in main
    prospector.print_messages()
  File "/venv/lib/python3.12/site-packages/prospector/run.py", line 161, in print_messages
    self.write_to(formatter, sys.stdout)
  File "/venv/lib/python3.12/site-packages/prospector/run.py", line 169, in write_to
    formatter.render(
  File "/venv/lib/python3.12/site-packages/prospector/formatters/pylint.py", line 69, in render
    output.extend(self.render_messages())
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/prospector/formatters/pylint.py", line 20, in render_messages
    module_name = str(self._make_path(message.location)).replace(os.path.sep, ".")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/prospector/formatters/base.py", line 31, in _make_path
    path_ = location.relative_path(self.paths_relative_to)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.12/site-packages/prospector/message.py", line 39, in relative_path
    return self._path.relative_to(root) if root else self._path
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/pathlib.py", line 682, in relative_to
    raise ValueError(f"{str(self)!r} is not in the subpath of {str(other)!r}")
ValueError: '/venv/lib/python3.12/site-packages/mypy/typeshed/stdlib/asyncio/subprocess.pyi' is not in the subpath of '/opt'
make: *** [Makefile:19: prospector] Error 1
@sbrunner sbrunner linked a pull request Dec 25, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant