Stream: troubleshooting

Topic: poetry error building GDCC website


view this post on Zulip Philip Durbin πŸš€ (Feb 04 2025 at 19:35):

Help! I'm getting this error:

% poetry install

Installing dependencies from lock file

No dependencies to install or update

Installing the current project: gdcc-website (0.1.0)
Warning: The current project could not be installed: No file/folder found for package gdcc-website
If you do not want to install the current project use --no-root.
If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
In a future version of Poetry this warning will become an error!

view this post on Zulip Philip Durbin πŸš€ (Feb 04 2025 at 19:36):

For context, please see https://github.com/gdcc/www.gdcc.io/issues/21

view this post on Zulip Philip Durbin πŸš€ (Feb 04 2025 at 19:36):

@Oliver Bertuch @Jan Range you love Poetry. Any suggestions?

view this post on Zulip Philip Durbin πŸš€ (Feb 04 2025 at 19:59):

https://stackoverflow.com/questions/75445290/poetry-no-file-folder-for-package/78188646#78188646 seems to suggest that this might fix it, but it doesn't unfortunately:

% git diff
diff --git a/pyproject.toml b/pyproject.toml
index 0d67ae2..71dbd74 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
 [tool.poetry]
-name = "gdcc-website"
+name = "www.gdcc.io"
 version = "0.1.0"
 description = "Sphinx project for GDCC's main website"
 homepage = "https://dataverscommunity.global"

view this post on Zulip Philip Durbin πŸš€ (Feb 04 2025 at 20:16):

For the GitHub Action it's an error rather than a warning and it exits as non-zero:

Installing the current project: gdcc-website (0.1.0)

Error: The current project could not be installed: No file/folder found for package gdcc-website
If you do not want to install the current project use --no-root.
If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
If you did intend to install the current project, you may need to set `packages` in your pyproject.toml file.

Error: Process completed with exit code 1.

view this post on Zulip Philip Durbin πŸš€ (Feb 04 2025 at 20:17):

GitHub Actions is using poetry 2.0.1

My laptop is using poetry 1.8.3

view this post on Zulip Philip Durbin πŸš€ (Feb 04 2025 at 20:21):

It looks like they switched it from a warning to an error here: https://github.com/python-poetry/poetry/pull/9333

view this post on Zulip Philip Durbin πŸš€ (Feb 04 2025 at 20:46):

I downgraded Poetry to the latest 1.x version and that fixed it. Here's a new issue for trying again to get Poetry 2 working some day: https://github.com/gdcc/www.gdcc.io/issues/36

Poetry 2 came out on January 5th, by the way.

view this post on Zulip Jan Range (Feb 07 2025 at 08:27):

I am using poetry merely as a dependency manager and not its install feature. Also, haven't touched down on poetry 2 yet, but I saw you've resolved it by hard coding the version. As an alternative, you can always install via pip, because the pyproject.toml can be universally used between installers.

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 14:00):

@Jan Range would you be able to show me a diff of what you mean? An untested diff is fine. :big_smile:

view this post on Zulip Jan Range (Feb 07 2025 at 19:34):

Sure, will check and send you the diff :smile:

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 19:35):

Thank you!

view this post on Zulip Jan Range (Feb 07 2025 at 19:41):

Have you tried running poetry install --no-root in the workflow? I guess the error boils down to that poetry is looking for a package within the directory, but cant find one. Hence, the error.

view this post on Zulip Jan Range (Feb 07 2025 at 19:42):

Testing it on my fork

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 19:43):

I haven't tried in the workflow, no.

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 19:51):

It is easy for you to switch between poetry versions locally?

view this post on Zulip Jan Range (Feb 07 2025 at 19:56):

Opened a PR here :smile:

https://github.com/gdcc/www.gdcc.io/pull/37

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 19:57):

Cool, thanks but about the other diff? Installing via pip or something?

view this post on Zulip Jan Range (Feb 07 2025 at 19:57):

It is easy for you to switch between poetry versions locally?

I am using Conda for my virtual environments and Poetry mostly for the dependency management, like adding or updating new ones.

view this post on Zulip Jan Range (Feb 07 2025 at 19:58):

I don't think that is necessary anymore. You could also install via pip, but that is the same thing.

view this post on Zulip Jan Range (Feb 07 2025 at 19:59):

With this out of the way everything should work as before.

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:03):

I don't have a great way to test PR 37. Should I just merge it and revert if it breaks stuff?

view this post on Zulip Jan Range (Feb 07 2025 at 20:07):

I think everything should work fine. Tested it here without the deployment:

https://github.com/JR-1991/dataversecommunity.global/actions/runs/13206936782

Since the issue was due to poetry I guess the subsequent steps should be fine.

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:10):

I'll merge it. But I should mark it to close # Poetry version hard coded to a 1.x versionΒ #36, right?

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:12):

Also, should we remove this comment? https://github.com/gdcc/www.gdcc.io/pull/37#pullrequestreview-2602738760

view this post on Zulip Jan Range (Feb 07 2025 at 20:13):

Oh yes, the comment can leave

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:17):

Great. And I added closes #36

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:18):

Merged! Fingers crossed! https://github.com/gdcc/www.gdcc.io/actions/runs/13207377691

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:18):

pipx install: error: the following arguments are required: package_spec :bomb:

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:18):

Screenshot 2025-02-07 at 3.18.34β€―PM.png

view this post on Zulip Jan Range (Feb 07 2025 at 20:20):

Got it - https://github.com/gdcc/www.gdcc.io/pull/38

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:21):

Thanks! Merged! Second time's the charm, right? :sweat_smile: https://github.com/gdcc/www.gdcc.io/actions/runs/13207420393

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:21):

Worked! Thanks!

view this post on Zulip Jan Range (Feb 07 2025 at 20:21):

I've deleted the whole package spec in the PR - Sorry :grinning:

view this post on Zulip Jan Range (Feb 07 2025 at 20:21):

Haha yea that's true :grinning:

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:21):

I blame my poor code review :sweat_smile:

view this post on Zulip Philip Durbin πŸš€ (Feb 07 2025 at 20:26):

Ok, and it's still working for me locally on poetry 1.8.3. Makes sense. All we changed was the github action.

view this post on Zulip Philip Durbin πŸš€ (Sep 18 2025 at 19:48):

Hmm, now I'm getting the same error on my Mac, with poetry 2.2.0 newly installed through homebrew:

pdurbin@beamish www.gdcc.io % poetry install
Creating virtualenv gdcc-website-ovyJev99-py3.13 in /Users/pdurbin/Library/Caches/pypoetry/virtualenvs
Installing dependencies from lock file

Package operations: 51 installs, 0 updates, 0 removals

  - Installing certifi (2024.7.4)
  - Installing charset-normalizer (3.2.0)
  - Installing idna (3.7)
  - Installing markupsafe (2.1.3)
  - Installing mdurl (0.1.2)
  - Installing urllib3 (2.2.2)
  - Installing alabaster (0.7.13)
  - Installing pygments (2.16.1)
  - Installing six (1.16.0)
  - Installing imagesize (1.4.1)
  - Installing jinja2 (3.1.6)
  - Installing markdown-it-py (3.0.0)
  - Installing packaging (23.1)
  - Installing requests (2.32.2)
  - Installing babel (2.12.1)
  - Installing docutils (0.20.1)
  - Installing snowballstemmer (2.2.0)
  - Installing soupsieve (2.5)
  - Installing sphinxcontrib-applehelp (1.0.7)
  - Installing sphinxcontrib-devhelp (1.0.5)
  - Installing sphinxcontrib-htmlhelp (2.0.4)
  - Installing sphinxcontrib-jsmath (1.0.1)
  - Installing sphinxcontrib-qthelp (1.0.6)
  - Installing sphinxcontrib-serializinghtml (1.1.9)
  - Installing tornado (6.4.2)
  - Installing wrapt (1.15.0)
  - Installing accessible-pygments (0.0.4)
  - Installing beautifulsoup4 (4.12.2)
  - Installing colorama (0.4.6)
  - Installing deprecated (1.2.14)
  - Installing livereload (2.6.3)
  - Installing mdit-py-plugins (0.4.0)
  - Installing psutil (5.9.5)
  - Installing pyyaml (6.0.1)
  - Installing setuptools (78.1.1)
  - Installing sphinx (7.2.6)
  - Installing typing-extensions (4.8.0)
  - Installing tomli (2.0.1)
  - Installing wheel (0.41.2)
  - Installing myst-parser (2.0.0)
  - Installing sphinx-icon (0.1.2)
  - Installing sphinxcontrib-contentui (0.2.5)
  - Installing sphinxext-opengraph (0.6.3)
  - Installing pydata-sphinx-theme (0.14.1)
  - Installing sphinxcontrib-mermaid (0.8.1)
  - Installing sphinxemoji (0.2.0)
  - Installing taskipy (1.12.0)
  - Installing sphinx-autobuild (2021.3.14)
  - Installing sphinx-favicon (0.2)
  - Installing sphinx-togglebutton (0.3.2)
  - Installing sphinxcontrib-images (0.9.4)

Installing the current project: gdcc-website (0.1.0)
Error: The current project could not be installed: No file/folder found for package gdcc-website
If you do not want to install the current project use --no-root.
If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
If you did intend to install the current project, you may need to set `packages` in your pyproject.toml file.

view this post on Zulip Philip Durbin πŸš€ (Sep 18 2025 at 19:50):

In https://github.com/gdcc/www.gdcc.io/pull/37 we added --no-root so I guess I'll try it.

view this post on Zulip Philip Durbin πŸš€ (Sep 18 2025 at 19:50):

Hmm, not sure what this means, but no error at least!

pdurbin@beamish www.gdcc.io % poetry install --no-root
Installing dependencies from lock file

No dependencies to install or update

view this post on Zulip Philip Durbin πŸš€ (Sep 18 2025 at 19:51):

poetry run task docs-build worked. That's good. I guess I'll update the README.

view this post on Zulip Philip Durbin πŸš€ (Sep 18 2025 at 19:56):

Made https://github.com/gdcc/www.gdcc.io/pull/59 and requested a review from @Jan Range and @Oliver Bertuch

view this post on Zulip Jan Range (Sep 18 2025 at 20:03):

Reviewing now :slight_smile:

view this post on Zulip Oliver Bertuch (Sep 19 2025 at 06:27):

Merged.


Last updated: Oct 30 2025 at 06:21 UTC