What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-31 05:15:37
python wikipedia
import wikipediaapi wiki = wikipediaapi.Wikipedia("en") page = wiki.page("Python (programming language)") print(page.summary) # Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy... Add solution -
Other 2021-11-05 13:49:12
AttributeError: 'NoneType' object has no attribute
As you are in python3 , use dict.items() instead of dict.iteritems() iteritems() was removed in python3, so you can't use this method anymore. Take a look at Python 3.0 Wiki Built-in Changes section, where it is stated: Removed dict.iteritems(), dict.i... Add solution -
Python 2021-09-07 14:51:01
request.body django
In Python 3.0 to Python 3.5.x, json.loads() will only accept a unicode string, so you must decode request.body (which is a byte string) before passing it to json.loads(). body_unicode = request.body.decode('utf-8') body = json.loads(body_unicode) content... Add solution