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

Unidecode error while exporting in Poetry 1.2 #6514

Closed
3 tasks done
nbro10 opened this issue Sep 14, 2022 · 7 comments
Closed
3 tasks done

Unidecode error while exporting in Poetry 1.2 #6514

nbro10 opened this issue Sep 14, 2022 · 7 comments
Labels
kind/bug Something isn't working as expected

Comments

@nbro10
Copy link
Contributor

nbro10 commented Sep 14, 2022

  • 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: macOS Monterey (version 2.4)
  • Poetry version: 1.2.0
  • Link of a Gist with the contents of your pyproject.toml file: gist

Issue

I am getting a Unidecode error. Here's how to reproduce it.

  1. Create a pyproject.toml as follows
[tool.poetry]
name = "poetry-unidecode-issue"
version = "0.1.0"
description = ""
authors = ["me"]
readme = "README.md"
packages = [{include = "poetry_unidecode_issue"}]

[tool.poetry.dependencies]
python = "^3.8"

python-slugify = {version = "^6.1.2", extras = ["Unidecode"]}

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
  1. Do poetry update
  2. Do poetry export -f requirements.txt --without-hashes --output requirements.txt and get the very useful 'Unidecode' error message. If you use the debug mode, you will also get a KeyError.

Solution

Change python-slugify = {version = "^6.1.2", extras = ["Unidecode"]} to python-slugify = {version = "^6.1.2", extras = ["unidecode"]}. So, clearly, Poetry searches for an extra dep, but it's case sensitive.

@nbro10 nbro10 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 14, 2022
@dimbleby
Copy link
Contributor

duplicate python-poetry/poetry-plugin-export#107

@nbro10
Copy link
Contributor Author

nbro10 commented Sep 14, 2022

@dimbleby This error does not occur in Poetry 1.1.15. In other words, if we have python-slugify = {version = "^6.1.2", extras = ["Unidecode"]}, and do an export, the error does not occur. Moreover, you can both do pip install Unidecode and pip install unidecode, so why isn't poetry also able to solve this issue? So, I am not sure this is really a duplicate.

@dimbleby
Copy link
Contributor

nevertheless, it really is

@nbro10
Copy link
Contributor Author

nbro10 commented Sep 14, 2022

@dimbleby Ok, as you wish, but this is a poetry bug. Poetry should be able to map unidecode to Unidecode because they are the same dep.

@dimbleby
Copy link
Contributor

if you separately want to raise an issue about the case-sensitivity of extras - well that will duplicate #6321 so we don't need that either!

@nbro10
Copy link
Contributor Author

nbro10 commented Sep 14, 2022

Ok, I agree that this is a duplicate of #6321, so I will close this.

@nbro10 nbro10 closed this as completed Sep 14, 2022
@mkniewallner mkniewallner removed the status/triage This issue needs to be triaged label Sep 18, 2022
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants