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.

git repo with hypthens fails with error

See original GitHub issue
  • [ x] I am on the latest Poetry version.

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

  • [ x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: Fedora 34

  • Poetry version: 1.1.5

  • **Link of a Gist

Issue

When adding a git repo that includes a hyphen in the org/path poetry fails to add with an error:

TypeError

  expected string or bytes-like object

  at ~/.local/lib/python3.9/site-packages/poetry/core/utils/helpers.py:27 in canonicalize_name
       23│ _canonicalize_regex = re.compile(r"[-_]+")
       24│ 
       25│ 
       26│ def canonicalize_name(name):  # type: (str) -> str
    →  27│     return _canonicalize_regex.sub("-", name).lower()
       28│ 
       29│ 
       30│ def module_name(name):  # type: (str) -> str
       31│     return canonicalize_name(name).replace(".", "_").replace("-", "_")

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
skairunnercommented, May 13, 2022

I am happy to confirm that poetry@master resolves this particular issue.

0reactions
neersightedcommented, May 11, 2022

@skairunner Could you please test your failing repo against current master?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't checkout git branch started with hyphen (-)
This repository has a remote branch something like -feature-abc . When I type git checkout -feature-abc , I get: error: unknown switch `e'....
Read more >
Allow search of code with hyphen - Merge requests - GitLab
I find there will be 500 error if search key is begin with dash/hyphen. ... def search_files(query, ref) offset = 2 args =...
Read more >
git-rev-parse Documentation - Git
List the GIT_* environment variables that are local to the repository (e.g. GIT_DIR or GIT_WORK_TREE, but not GIT_EDITOR). Only the names of the...
Read more >
Errors – Vercel Docs
This connection is interrupted if the Git repository is deleted, archived, or if the Vercel App was uninstalled from the corresponding Git account...
Read more >
Period in repo name causes problems | Bitbucket Server - Jira
They must start with a letter or number and may contain spaces, hyphens, underscores and ... Stash 1.1.0: git clone using http fails,...
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