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

[ValueError] Repository <foo> does not exist in Docker build #2109

Closed
3 tasks done
timothyjlaurent opened this issue Feb 28, 2020 · 4 comments
Closed
3 tasks done

[ValueError] Repository <foo> does not exist in Docker build #2109

timothyjlaurent opened this issue Feb 28, 2020 · 4 comments
Labels
kind/bug Something isn't working as expected

Comments

@timothyjlaurent
Copy link

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name:

Ubuntu 18.04 in docker

  • Poetry version:

1.0.4

  • Link of a Gist with the contents of your pyproject.toml file:

https://gist.github.com/timothyjlaurent/5b415a428114c4da8d99753d4381d60d

Issue

We had been building with poetry in a docker container for the past couple months. Suddenly today, the build stopped working and raising a ValueError instead. Near the bottom of the dependencies list we have a package pointing to an internal repo, when it tries to install this package this happens:

[ValueError]
Repository "companyx" does not exist.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/clikit/console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File "/usr/local/lib/python3.6/dist-packages/clikit/api/command/command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File "/usr/local/lib/python3.6/dist-packages/clikit/api/command/command.py", line 171, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "/usr/local/lib/python3.6/dist-packages/cleo/commands/command.py", line 92, in wrap_handle
    return self.handle()
  File "/usr/local/lib/python3.6/dist-packages/poetry/console/commands/install.py", line 63, in handle
    return_code = installer.run()
  File "/usr/local/lib/python3.6/dist-packages/poetry/installation/installer.py", line 74, in run
    self._do_install(local_repo)
  File "/usr/local/lib/python3.6/dist-packages/poetry/installation/installer.py", line 286, in _do_install
    self._execute(op)
  File "/usr/local/lib/python3.6/dist-packages/poetry/installation/installer.py", line 302, in _execute
    getattr(self, '_execute_{}'.format(method))(operation)
  File "/usr/local/lib/python3.6/dist-packages/poetry/installation/installer.py", line 327, in _execute_install
    self._installer.install(operation.package)
  File "/usr/local/lib/python3.6/dist-packages/poetry/installation/pip_installer.py", line 47, in install
    repository = self._pool.repository(package.source_reference)
  File "/usr/local/lib/python3.6/dist-packages/poetry/repositories/pool.py", line 40, in repository
    raise ValueError('Repository "{}" does not exist.'.format(name))

Even though we have this in the project.toml

[[tool.poetry.source]]
name = "companyx"
url = "http://build.companyx.net:10001/simple/"

I tried updating the lock file, downgrading poetry to 1.0.3 and 1.0.2, but I'm getting the value error everywhere.

Again, I'm able to build this locally on OS-X but the poetry install on Docker Ubuntu 18.04 just started failing.

@timothyjlaurent timothyjlaurent added the kind/bug Something isn't working as expected label Feb 28, 2020
@timothyjlaurent timothyjlaurent changed the title [ValueError] Repository <foo> does not exist. [ValueError] Repository <foo> does not exist in Docker build Feb 28, 2020
@timothyjlaurent
Copy link
Author

When upgrading poetry locally to 1.0.4 it breaks too.
I'll double check that it can't be fixed with earlier poetry in docker.

@timothyjlaurent
Copy link
Author

this is related to #2110
So long story even longer:

poetry installed with pip has this problem installing packages from custom repos for all 1.0.x versions.

If you install with get_poetry.py then it is broken in 1.0.4 but can be rescued by installing 1.0.3 (or presumably lower)

@timothyjlaurent
Copy link
Author

fixed by the fix to #2110

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant