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.

KeyError: Package('pycurl', '7.44.1', source_type='legacy' ...) on celery update

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: docker image (python:3.9-buster)

  • Poetry version: 1.1.12

# relevant contents of the toml
boto3 = "*"
celery = {extras = ["sqs"], version = "*"}
# this is what I have to have in order for things to work
# pycurl = "*"

Issue

I want to update celery to the latest version (5.2.3). Nothing in the pyproject.toml stops me, i.e. no transitive dependency mismatches. However, when I poetry update, it’s unable to upgrade pycurl to latest deployed version. So then I add pycurl to the toml, although I don’t use it directly. update works. Now, I have to keep pycurl around in the toml for everything to work. If I remove it, I get the following error on poetry install:

KeyError

  Package('pycurl', '7.44.1', source_type='legacy', source_url='https://our-pypi-proxy', source_reference='company')

  at ~/.local/lib/python3.9/site-packages/poetry/puzzle/solver.py:270 in _solve
      266│
      267│                 continue
      268│
      269│             final_packages.append(package)
    → 270│             depths.append(results[package])
      271│
      272│         # Return the packages in their original order with associated depths
      273│         return final_packages, depths
      274│

I think I should have to carry a transitive dependency in the toml. Can someone see what’s wrong?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
henrysingletoncommented, Jan 26, 2022

Also happening for me, identical behaviour for poetry versions 1.1.4, 1.1.11 and 1.1.12. Using Python 3.9.7.

Example dependencies that will reproduce the issue:

[tool.poetry.dependencies]
python = "^3.9"
celery = {extras = ["sqs"], version = "5.2.3"}

Either manually installing pycurl first or adding pycurl = "*" to requirements also worked for me.

1reaction
fangpenlincommented, Jan 10, 2022

Oh, actually, the workaround works if provides

pycurl = "*"
boto3 = "*"

added

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does celery return a KeyError when executing my task?
In the celery output, you see that the task that gets picked up is tournaments.tasks.notify_match_creation (#1). and in your key error it is...
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