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

ImportError: cannot import name 'decode' from 'poetry.core.utils.helpers' #8349

Closed
4 tasks done
jcrada opened this issue Aug 22, 2023 · 5 comments
Closed
4 tasks done
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@jcrada
Copy link

jcrada commented Aug 22, 2023

  • Poetry version: 1.6.1

  • Python version: 3.9.17

  • OS version and name: macOS 13.2.1

  • pyproject.toml: https://github.com/fuzzylite/pyfuzzylite/blob/development/pyproject.toml

  • I am on the latest stable Poetry version, installed using a recommended method.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • I have consulted the FAQ and blog for any relevant entries or release notes.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

 ImportError

  cannot import name 'decode' from 'poetry.core.utils.helpers' (/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/poetry/core/utils/helpers.py)

  at /opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py:30 in <module>
       26│ from poetry.core.masonry.builders.sdist import SdistBuilder
       27│ from poetry.core.masonry.utils.helpers import distribution_name
       28│ from poetry.core.masonry.utils.helpers import normalize_file_permissions
       29│ from poetry.core.masonry.utils.package_include import PackageInclude
    →  30│ from poetry.core.utils.helpers import decode
       31│ from poetry.core.utils.helpers import temporary_directory
       32│ 
       33│ 
       34│ if TYPE_CHECKING:

See very verbose output here: https://github.com/fuzzylite/pyfuzzylite/actions/runs/5940500284/job/16109203669?pr=46

@jcrada jcrada added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Aug 22, 2023
@jcrada jcrada changed the title [poetry 1.6.1] ImportError: cannot import name 'decode' from 'poetry.core.utils.helpers' ImportError: cannot import name 'decode' from 'poetry.core.utils.helpers' Aug 22, 2023
@dimbleby
Copy link
Contributor

that's not what the code looks like any more as you can verify for yourself - https://github.com/python-poetry/poetry-core/blob/b111cd649f7e9d7ad01f2eab40691763d5058e7c/src/poetry/core/masonry/builders/wheel.py#L30

so you've somehow got an inconsistent installation. Suggest uninstalling and try again

@jcrada
Copy link
Author

jcrada commented Aug 22, 2023

That's funny because the latest version gets installed automatically in my github action and I have not configured any caching in the environment. Locally, it failed the first time after I did poetry self update

@dimbleby
Copy link
Contributor

nevertheless the problem is clearly at your end and there's nothing that can be done here to help you.

python-poetry/poetry-core#602 is the single MR that both removed the code that you can't find: and also removed the code that can't find it

@jcrada
Copy link
Author

jcrada commented Aug 22, 2023

Ok. Thanks. Fixed by explicitly installing previous version 1.5.1.

@jcrada jcrada closed this as completed Aug 22, 2023
Copy link

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 Feb 29, 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 status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants