UnicodeDecodeError when installing dbt
See original GitHub issueDescribe the bug
When attempting to pip install dbt a UnicodeDecodeError
is thrown.
Our machine’s default encoding is ANSI_X3.4-1968
This error was traced back to a specific character in the README. It is the dash that follows the line: Models frequently build on top of one another
. If this character is removed dbt can install correctly.
UnicodeEncodeError: 'ascii' codec can't encode character '\u2013' in position 0: ordinal not in range(128)
Steps To Reproduce
pip install dbt
Expected behavior
We expect to properly install dbt.
Screenshots and log output
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-6skr9ygr-build/setup.py", line 9, in <module>
long_description = f.read()
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1860: ordinal not in range(128)
System information
Which database are you using dbt with?
- postgres
- redshift
- bigquery
- snowflake
- other (specify: N/A)
The output of dbt --version
:
N/A
The operating system you’re using:
GNU/Linux
The output of python --version
:
Python 3.6.8
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
UnicodeDecodeError when installing dbt · Issue #1771 - GitHub
Describe the bug When attempting to pip install dbt a UnicodeDecodeError is thrown. Our machine's default encoding is ANSI_X3.4-1968 This error was traced ......
Read more >Unicode decode error when installing polyglot - Stack Overflow
I tried changing the encoding to utf-16 but the same problem occured. ERROR: Command errored out with exit status 1: command: 'e:\anaconda\ ...
Read more >Install with pip | dbt Developer Hub
You need to use pip to install dbt Core on Windows or Linux operating systems. You should use Homebrew for installing dbt Core...
Read more >In my ubuntu 22.04 pip install gives me UnicodeDecodeError ...
I just debugged codec.py in /usr/lib/python3.9/codecs.py . It seems to be receiving some invalid data. enter image description here.
Read more >Strange behavior with non-ascii strings on newer version
The older, correctly working, version is installed with Ubuntu's package system ... UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 3: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @drewbanin, I’m also encountering this bug. A better fix might be to require setuptools v40.1.0+ because this version supports unicode chars:
https://setuptools.readthedocs.io/en/latest/history.html#v40-1-0
It looks like the
core
package already requires this version of setuptools, so the enforcement just needs to occur in the overallsetup.py
:https://github.com/fishtown-analytics/dbt/blob/dev/0.15.1/core/setup.py#L6
Would you be open to this change? If so I’m happy to open a PR. Thanks!
I just changed this to a #wontfix - while I’d still be happy to merge a PR which changes this one particular character (i don’t feel opinionated on a dash vs. an em-dash at all), there are surely going to be other such characters placed in and around the dbt codebase in the future. I’m not inclined to make a rule that we will never include such characters in the dbt codebase/readme, so going to close this on that principle.
@alejandro-flores-1 if you’re able to sign the CLA, please do feel free to re-open the PR against
dev/louisa-may-alcott
.