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

Error raised by version 5.2.1+ when repo contains symlinks #1421

Closed
andreipetre opened this issue Aug 27, 2020 · 2 comments
Closed

Error raised by version 5.2.1+ when repo contains symlinks #1421

andreipetre opened this issue Aug 27, 2020 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists
Milestone

Comments

@andreipetre
Copy link

I came across an issue introduced by version 5.2.1 where it would raise an error for a repo with symlinks to Python packages.

Traceback (most recent call last):
  File ".../bin/isort", line 8, in <module>
    sys.exit(main())
  File ".../isort/main.py", line 829, in main
    for sort_attempt in attempt_iterator:
  File ".../isort/main.py", line 818, in <genexpr>
    sort_imports(  # type: ignore
  File ".../isort/main.py", line 125, in iter_source_code
    dirnames.remove(dirname)
ValueError: list.remove(x): x not in list

isort 5.2.0 runs fine on the repo, 5.2.1 raises the above error. All versions after 5.2.0 (including 5.4.2) raise the same error.

@andreipetre
Copy link
Author

This is already fixed on the develop branch (acd14d8).

@timothycrosley timothycrosley added bug Something isn't working duplicate This issue or pull request already exists labels Aug 28, 2020
@timothycrosley timothycrosley added this to the 5.5.0 milestone Aug 28, 2020
@timothycrosley
Copy link
Member

A fix for this issue has just been deployed to PyPI in version 5.5.0 of isort.

Thanks!

~Timothy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants