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)
- 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
- Feature request: per-block sorting strategy (inline sort)
- Isort does not honor skip directories
- `isort` does not move all imports to the top of the file when there are imports after other code blocks
- `--sort-reexports` does not respect `--profile=black` HOT 2
- isort --profile black produces long lines HOT 8
- isort copies comments across imports HOT 4
- Feature request: Remove superfluous `import a` statements when there is already `import a.b`
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.