Poetry is a robust and convenient tool for building Python projects. The article Getting Started with Python Poetry demonstrated this in simple ter...
For further actions, you may consider blocking this person and/or reporting abuse
Great article but I have a problem with the scripting part in pyproject.toml:
The location of my project folder contains a space and this results in an error:
The question is how to improve the scripting part in pyproject.toml.
Regards
Michael
Interesting. You are right; that space in
Macintosh SR0
is causing problems. What version of poetry are you using, and how did you install it?It looks like your issue was supposed to have been resolved by Poetry Issue 1774, which is why I ask.
Hi Jonathan,
I've detected another bug in conjunction with a space in the path:
Poetry Issue 3630
I've created a new issue:
Poetry Issue 3643
Seems to be insufficient automated testing during the development of poetry.
Good job finding the first issue, and logging the other! Are both resolved by #3631, or just the first?
Thx - I do my best to learn python so currently I can only help with bug reports :-)
#3631 doesn’t solve the shebang problem, therefore the bug report.
Hi Jonathan,
I saw your comment on GitHub. May be I have to check the consequences of renaming the mount paths on my Mac. Should be the practical solution of the problem.
What about a symlink?
ln -s /Volumes/Macintosh\ SR0/ /HD
or something similar? I am not a Mac expert; just pondering.The path is already linked:
poetry "sees" the path but ignores the symbolic link.
Michael, what do you think of these steps? Are they a decent, at least temporary, workaround?
You can adapt names, paths, etc to your liking.
In summary, the above creates a symlink to your users directory (call it
homeward
orhome
or whatever you like), then, instead of storing the virtual environment in.venv
in the project directory, sets it in poetry's global config to be in a directory of your choosing. Remove the existing.venv
in the project, reinstall the project, and it should use the new virtual environment without spaces.What do you think?
Hi Jonathan,
thx for your suggestion. The symbolic path exists already:
Create the virtualenv inside the project's root directory leads to:
Using the default virtualenv folder looks much better:
So may be this is the bug in poetry: the shebang line is not the symbolic one if the virtualenv folder is in the project's root directory.
That's well put.
Thanks, this was really great to catch up on poetry's features and usage.
Glad to hear it was useful! Thanks.
great article! unblocked me.