Comments (4)
Thanks for reporting this issue! The problem has been verified and it will be resolved in the next point release
from isort.
cool! that's what I wanner talking about. 🎯
from isort.
This has been fixed in release 1.3.1, Thanks!
from isort.
Hi!
Sorry to re-open such an old thread.
I just ran into this problem when running isort on OSX yosemite, with python 3.4.2 and isort 3.9.4
The problems seems to be that OSX doesn't have LANG set to anything by default, so when isort opens the file to check (line 94), it doesn't specify an encoding, which then default to "ASCII" on OSX.
If LANG is set to something like en_US.UTF-8 the problem goes away, but will break in systems where for any reason changing the locale is not an option.
The second link I put here talks about a “Unicode sandwich” approach. That might solve the problem.
http://robjwells.com/post/61198832297/get-your-us-ascii-out-of-my-face
http://nedbatchelder.com/text/unipain.html
Traceback (most recent call last):
File "/Users/fjm/Development/acora_dj/venv/bin/isort", line 11, in <module>
sys.exit(main())
File "/Users/fjm/Development/acora_dj/venv/lib/python3.4/site-packages/isort/main.py", line 119, in main
incorrectly_sorted = SortImports(file_name, **arguments).incorrectly_sorted
File "/Users/fjm/Development/acora_dj/venv/lib/python3.4/site-packages/isort/isort.py", line 95, in __init__
file_contents = file_to_import_sort.read()
File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2709: ordinal not in range(128)
from isort.
Related Issues (20)
- Sorting order is broken and not following standard sort order HOT 13
- Third-party incorrectly identify as First-party depending on the name of the root directory
- isort.core.process incorrectly returns False if only changes to lines before imports were made, with no changes to raw import section
- Ran into `ERROR: Unrecoverable exception thrown when parsing <filepath>`
- Feature Request: Improved Handling of `# type: ignore` Comments to Preserve Mypy Compatibility HOT 1
- Different order on same file depending on where you execute isort v5.13.2 HOT 1
- THIRDPARTY module detected as FIRSTPARTY when import happens within subdir of same name
- Black line length config support when using `--profile black`? HOT 1
- isort does not recognize _collections_abc as part of the standard library HOT 1
- Unrecoverable exception thrown using --sort-reexports
- Feature Request: Automatic Conversion of Relative Imports to Absolute Imports
- isort doesn't format the imports in PyCharm's Jupyter notebooks
- False order of local imports relative to standard library imports
- Circular Import Issue Due to Import Reordering in Python 3.8
- Bug : isort add empty lines before pylint comments
- Deprecate `setuptools` integration comand
- Docs: GitHub action and Pre-commit need better configuration/args examples HOT 1
- Bug: Word wrapping works incorrectly with force_single_line=True
- isort breaks the code with sort_reexports = true HOT 2
- noqa isn't well respected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isort.