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

poetry: flatpak-poetry-generator.py doesn't seem to work with new poetry.lock files #371

Open
micahflee opened this issue Sep 10, 2023 · 1 comment
Labels

Comments

@micahflee
Copy link

flatpak-builder version

1.2.3

Linux distribution and version

Ubuntu 23.04

Affected flatpak-builder tool

cargo/flatpak-cargo-generator.py

flatpak-builder tool cli args

No response

Source repository URL

No response

Flatpak-builder manifest URL

No response

Description

It seems that flatpak-poetry-generator.py doesn't work with poetry.lock files generated by Poetry 1.5.1. Here's the error I get:

$ ./flatpak-poetry-generator.py ../../onionshare/cli/poetry.lock
Scanning "../../onionshare/cli/poetry.lock" 
Traceback (most recent call last):
  File "/home/user/code/flatpak-builder-tools/poetry/./flatpak-poetry-generator.py", line 166, in <module>
    main()
  File "/home/user/code/flatpak-builder-tools/poetry/./flatpak-poetry-generator.py", line 139, in main
    dep_names = get_dep_names(parsed_lockfile, include_devel=include_devel)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/code/flatpak-builder-tools/poetry/./flatpak-poetry-generator.py", line 112, in get_dep_names
    package["category"] == "dev"
    ~~~~~~~^^^^^^^^^^^^
KeyError: 'category'

I tried fixing the missing category key problems, but then kept running into additional errors. I think that the problem is the format of poetry.lock has maybe changed in newer versions of Poetry.

I've attached the poetry.lock file.

poetry.lock.txt

@micahflee micahflee added the bug label Sep 10, 2023
@mig5
Copy link

mig5 commented Sep 13, 2023

@micahflee (just been reading your blog post) this one I actually recall happening when I tried to work on the last OnionShare release :) See this PR, I recall the patch working for me: #353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants