question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'NoneType' object has no attribute 'decode' on --download

See original GitHub issue

http --debug --session=test --timeout 10000 --check-status --download ‘http://37.143.19.22:8443/portal-api/rest/bo/plants-sale-contracts?_dc=1447383987687&return_count=no&page=1&s…’

HTTPie 0.9.2
HTTPie data: /home/pasha/.httpie
Requests 2.7.0
Pygments 1.6
Python 2.7.10 (default, Sep  8 2015, 17:20:17)
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] linux2

>>> requests.request({'allow_redirects': True,
 'auth': None,
 'cert': None,
 'data': OrderedDict(),
 'files': DataDict(),
 'headers': {u'Accept': 'application/json',
             'Accept-Encoding': None,
             'User-Agent': 'HTTPie/0.9.2',
             u'password': 'admin',
             u'user': 'admin'},
 'method': 'get',
 'params': ParamsDict(),
 'proxies': {},
 'stream': True,
 'timeout': 10000.0,
 'url': u'http://37.143.19.22:8443/portal-api/rest/bo/plants-sale-contracts?_dc=1447383987687&return_count=no&page=1&start=0&size=20&sort=%5B%7B%22property%22%3A%22party%22%2C%22direction%22%3A%22ASC%22%7D%5D&filter=%5B%7B%22property%22%3A%22sourceSystem%22%2C%22value%22%3A%22%22%2C%22operator%22%3A%22%3D%22%7D%5D',
 'verify': True})

Traceback (most recent call last):
  File "/bin/http", line 9, in <module>
    load_entry_point('httpie==0.9.2', 'console_scripts', 'http')()
  File "/usr/lib/python2.7/site-packages/httpie/core.py", line 112, in main
    response = get_response(args, config_dir=env.config.directory)
  File "/usr/lib/python2.7/site-packages/httpie/client.py", line 48, in get_response
    read_only=bool(args.session_read_only),
  File "/usr/lib/python2.7/site-packages/httpie/sessions.py", line 52, in get_response
    session.update_headers(kwargs['headers'])
  File "/usr/lib/python2.7/site-packages/httpie/sessions.py", line 104, in update_headers
    value = value.decode('utf8')
AttributeError: 'NoneType' object has no attribute 'decode'

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jakubroztocilcommented, Apr 12, 2016

Still to be released — hopefully soon!

0reactions
Hubbituscommented, Apr 11, 2016

Do you plan make new version release with it? Or it already contained in one?

Read more comments on GitHub >

github_iconTop Results From Across the Web

'NoneType' object has no attribute 'decode' - Stack Overflow
There seems to be a None value somewhere where a string is expected, and the traceback seems to show it is the label...
Read more >
AttributeError: 'NoneType' object has no attribute 'decode' #1
I get AttributeError: 'NoneType' object has no attribute 'decode' when running the example on my Pico. The culprit is the second line.
Read more >
AttributeError: NoneType has no attribute 'utf_8_decode'
I'm hesitant to file a bug with Python because the core Python is not necessarily implicated, but because this problem emerged in the...
Read more >
8764 (AttributeError: 'NoneType' object has no attribute 'decode')
How to Reproduce. While doing a POST operation on /importer , Trac issued an internal error. (please provide additional details here). Request parameters:...
Read more >
AttributeError: 'NoneType' object has no attribute 'decode'
Coding example for the question AttributeError: 'NoneType' object has no attribute 'decode'
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found