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.

  • 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 Bionic Beaver
  • Poetry version: 0.12.10

Issue

i try to publish to my local devpi server. i added it like this:

poetry config repositories.foo http://localhost:3141/root/dev/

when i try to publish i get his:

poetry publish -r foo -u root -p mypassword --build -vvv                                                                                         12.2s  Di 11 Dez 2018 10:00:55 CET

There are 2 files ready for publishing. Build anyway? (yes/no) [no] yes

Virtualenv my-python-project-py3.7 already exists.
Using virtualenv: /home/preuss/.cache/pypoetry/virtualenvs/my-python-project-py3.7
Building my_python_project (0.0.4)
 - Building sdist
 - Adding: src/my_python_project/__init__.py
 - Adding: src/my_python_project/cli.py
 - Adding: src/my_python_project/core.py
 - Adding: pyproject.toml
 - Adding: README.md
 - Built my_python_project-0.0.4.tar.gz

 - Building wheel
 - Adding: /tmp/tmpcnft47s2/my_python_project-0.0.4/src/my_python_project/__init__.py
 - Adding: /tmp/tmpcnft47s2/my_python_project-0.0.4/src/my_python_project/cli.py
 - Adding: /tmp/tmpcnft47s2/my_python_project-0.0.4/src/my_python_project/core.py
 - Built my_python_project-0.0.4-py3-none-any.whl

Publishing my_python_project (0.0.4) to foo

[RuntimeError]
"my-python-project-0.0.4.tar.gz" does not exist.

Exception trace:
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/poetry/console/application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/poetry/console/commands/command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/cleo/commands/command.py in execute() at line 107
   return self.handle()
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/poetry/console/commands/publish.py in handle() at line 54
   self.option("repository"), self.option("username"), self.option("password")
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/poetry/masonry/publishing/publisher.py in publish() at line 84
   return self._uploader.upload(url)
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/poetry/masonry/publishing/uploader.py in upload() at line 97
   self._upload(session, url)
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/poetry/masonry/publishing/uploader.py in _upload() at line 193
   self._register(session, url)
 /home/preuss/.pyenv/versions/3.7.1/lib/python3.7/site-packages/poetry/masonry/publishing/uploader.py in _register() at line 258
   raise RuntimeError('"{0}" does not exist.'.format(file.name))

publish [-r|--repository REPOSITORY] [-u|--username USERNAME] [-p|--password PASSWORD] [--build]

the devpi logs this:

2018-12-11 09:01:01,089 INFO  [req44] POST /root/dev/
2018-12-11 09:01:01,193 ERROR [req44] [Wtx6] while handling http://localhost:3141/root/dev/:
no project named 'my-python-project' was ever registered

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
kieruncommented, Dec 2, 2019

Does this really need closing? Has it been fixed?

6reactions
VikashKotharycommented, Feb 6, 2021

Yes I believe it has been fixed. I managed to get it working thanks to a few links below.

What I did:

  1. Connect to DevPi Server: devpi use http://localhost:3141
  2. Log in: devpi login root
  3. Create non-root user: devpi user -c packages email=packaging@company.com password=packages
  4. Create new package index: devpi index -c packages/stable bases=root/pypi volatile=False
  5. Add the Devpi repository to poetry: poetry config repositories.stable https://localhost:3141/packages/stable
  6. Publish to Devpi: poetry publish -r stable -u ${username} -p {password}

Then it should work. If you setup you’ve set the devpi repo as the default source, you can then just run poetry add <package> and it should work.

Links:

  1. https://github.com/python-poetry/poetry/issues/742#issuecomment-457740940
  2. https://stefan.sofa-rockers.org/2017/11/09/getting-started-with-devpi/
  3. https://python-poetry.org/docs/repositories/#using-a-private-repository
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set up DevPI, a PyPI-compatible Python development ...
Opensource.com aspires to publish all content under a Creative Commons license but may not be able to do so in all cases. You...
Read more >
devpi-client - PyPI
The devpi command line tool is typically used in conjunction with devpi-server. It allows to upload, test and install packages from devpi indexes....
Read more >
Can I upload a binary wheel to a local devpi on Linux?
Try to use the devpi upload with the --formats option set to bdist_wheel : $ devpi upload --formats bdist_wheel.
Read more >
Getting started with devpi - Stefan Scherfke
By default, devpi creates an index called root/pypi. It serves as a proxy and cache for PyPI and you can't upload your own...
Read more >
Publishing to a private Python repository with Poetry - Medium
Publish private Python packages to a private PyPI repository ... personal PyPI server — for example, this can be done using pypiserver or...
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