AttributeError: 'str' object has no attribute 'decode'
See original GitHub issueContinued from https://github.com/kennethreitz/pipenv/issues/541#issuecomment-329518287
This issue is likely to show up on libraries that need to support both Python 2 and 3 where pipenv
is being used to manage tooling. The feature:
Tell pip we’re using the required Python version, with trickery, for dependency resolution.
is keyed off python_version = "2.7"
, but to test that this project works with multiple versions of Python, my build matrix also runs with version of Python 3.
- Install Python 2
- Install Python 3 and set this as your global Python version
- Install pipenv 7.0.2
- Set a required Python version of 2.7 in
Pipfile
- Run
$ pipenv install --python=python2
@kennethreitz here are some build logs demonstrating the issue: https://travis-ci.org/jacebrowning/verchew/builds/275563258
Issue Analytics
- State:
- Created 6 years ago
- Comments:28 (28 by maintainers)
Top Results From Across the Web
'str' object has no attribute 'decode'. Python 3 error?
You are trying to decode an object that is already decoded. You have a str , there is no need to decode from...
Read more >Solve the attributeerror str object has no attribute decode error
This attribute error occurs because you are trying to call the decode() function on a Python string object, which is by default already...
Read more >Attributeerror: 'str' object has no attribute 'decode' ( Solved )
The main cause of the Attributeerror: 'str' object has no attribute 'decode' is that you are already decoding the decoded strings. Decoding is...
Read more >AttributeError: 'str' object has no attribute 'decode' | bobbyhadz
The Python "AttributeError: 'str' object has no attribute 'decode'" occurs when we call the decode() method on a string that has already ...
Read more >How To Solve 'Str' Object Has No Attribute 'Decode' Error
The 'str' object has no attribute 'decode' error is usually noticed in Python 3. Therefore, you should try to downgrade the Python version...
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 FreeTop 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
Top GitHub Comments
v7.0.6 released, which fixes this strange edge case.
trying an alternative approach first.