"poetry config" command does not create path to config.toml in 1.0.0a4
See original GitHub issue- 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 w/ python3.7 (in docker container)
- Poetry version: 1.0.0a4
- Link of a Gist with the contents of your pyproject.toml file: N/A
Issue
The poetry config
command does not auto create the path to the directory in latest preview version:
root@58ef10ebedba:/build# poetry --version
Poetry version 1.0.0a4
root@58ef10ebedba:/build# poetry config -vvv settings.virtualenvs.in-project true
[FileNotFoundError]
[Errno 2] No such file or directory: '/root/.config/pypoetry/config.toml'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/usr/local/lib/python3.7/dist-packages/clikit/api/command/command.py", line 112, in handle
status_code = self._do_handle(args, io)
File "/usr/local/lib/python3.7/dist-packages/clikit/api/command/command.py", line 160, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/usr/local/lib/python3.7/dist-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/usr/local/lib/python3.7/dist-packages/poetry/console/commands/config.py", line 152, in handle
setting_key, unique_config_values[setting_key], values
File "/usr/local/lib/python3.7/dist-packages/poetry/console/commands/config.py", line 240, in _handle_single_value
self._settings_config.add_property(key, normalizer(value))
File "/usr/local/lib/python3.7/dist-packages/poetry/config.py", line 65, in add_property
self.dump()
File "/usr/local/lib/python3.7/dist-packages/poetry/config.py", line 101, in dump
fd = os.open(str(self._file), os.O_WRONLY | os.O_CREAT, mode)
This works fine in latest stable version:
root@4575f7467c4c:/build# poetry --version
Poetry 0.12.16
root@4575f7467c4c:/build# ls /root/.config
ls: cannot access '/root/.config': No such file or directory
root@4575f7467c4c:/build# poetry config settings.virtualenvs.in-project true
root@4575f7467c4c:/build# ls /root/.config
pypoetry
root@4575f7467c4c:/build# ls /root/.config/pypoetry
auth.toml config.toml
root@4575f7467c4c:/build# cat /root/.config/pypoetry/config.toml
[settings]
[settings.virtualenvs]
in-project = true
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Configuration | Documentation | Poetry - Python dependency ...
Poetry can be configured via the config command (see more about its usage here) or directly in the config.toml file that will be...
Read more >All my poetry commands fail with 'The Poetry config is invalid'
@RandomDavis I have looked and it seems to be a different issue, because I still get 'The poetry config is invalid', no matter...
Read more >Best practices for setting up a Python environment
DreamProject>poetry init. This command will guide you through creating your pyproject.toml config.Package name [DreamProject]:
Read more >Dependency Management With Python Poetry
Learn how Python Poetry will help you start new projects, maintain existing ones, and master dependency management.
Read more >Poetry: Dependency Management for Python - PyPI
Could not find a version that matches pbr!=0.7,!=2.1.0,<1.0,>=0.6,>=2.0.0 ... Should match a repository name set by the config command.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With 1.0.0a4, I just had to create
~/.config/pypoetry
folder and the configuration was working. With 1.0.0b1, I have to create the folder + create the file~/.config/pypoetry/config.toml
.Great!