This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author qingyunha
Recipients qingyunha
Date 2017-12-18.06:24:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513578286.44.0.213398074469.issue32358@psf.upfronthosting.co.za>
In-reply-to
Content
```
>>> import json        
>>> f = open('/tmp/t.json', 'wb')              
>>> json.dump(123, f)  
Traceback (most recent call last):             
  File "<stdin>", line 1, in <module>          
  File "/usr/lib/python3.6/json/__init__.py", line 180, in dump                               
    fp.write(chunk)    
TypeError: a bytes-like object is required, not 'str'
```

This may not a bug. But it should mention at docs https://docs.python.org/3/library/json.html#json.dump
History
Date User Action Args
2017-12-18 06:24:46qingyunhasetrecipients: + qingyunha
2017-12-18 06:24:46qingyunhasetmessageid: <1513578286.44.0.213398074469.issue32358@psf.upfronthosting.co.za>
2017-12-18 06:24:46qingyunhalinkissue32358 messages
2017-12-18 06:24:45qingyunhacreate