[PYTHON] How to get rid of the "Tags must be an array of hashes." Error in the qiita api

When I hit qiita api with the python code below, I get the error "Tags must be an array of hashes."

{"error":"Tags must be an array of hashes."}
# -*- coding:utf-8 -*-

import urllib
reqdata = {}
reqdata['title'] = 'qiita first post'
reqdata['tags'] = [{'name':'qiita'}]
reqdata['body'] = 'first post'
reqdata['private'] = 0
reqdata['twitter'] = 0
reqdata['token'] = TOKEN
params = urllib.urlencode(reqdata)
url = 'https://qiita.com/api/v1/items'
print urllib.urlopen(url,params).read()#Now POST
print url+params

Before parameter decoding

body=first+post&tags=[{'name':+'qiita'}]&twitter=0&title=qiita+first+post&private=0&token=TOKEN

After parameter decoding

body=first post&tags=[{'name': 'qiita'}]&twitter=0&title=qiita first post&private=0&token=TOKEN

Recommended Posts

How to get rid of the "Tags must be an array of hashes." Error in the qiita api
How to get the number of digits in Python
How to limit the API to be published in the C language shared library of Linux
How to get rid of server custom emoji in message.content
How to get an overview of your data in Pandas
How to get a quadratic array of squares in a spiral!
How to intentionally issue an error in the shell During testing
How to know the internal structure of an object in Python
How to get the vertex coordinates of a feature in ArcPy
The story of an error in PyOCR
How to get rid of long comprehensions
I tried to get the authentication code of Qiita API with Python.
How to get help in an interactive shell
How to get article data using Qiita API
How to get the files in the [Python] folder
Create a filter to get an Access Token in the Graph API (Flask)
How to get a list of files in the same directory with python
[Python] How to deal with the is instance error "is instance () arg 2 must be a type or tuple of types"
I tried to explain how to get the article content with MediaWiki API in an easy-to-understand manner with examples (Python 3)
How to get the variable name itself in python
[Blender] How to get the selection order of vertices, edges and faces of an object
[Golang] Specify an array in the value of map
manage to get rid of heavy pyls in vim-lsp
Let's see how to count the number of elements in an array in some languages [Go, JavaScript, PHP, Python, Ruby, Swift]
How to specify an infinite number of tolerances in the numeric argument validation check of argparse
How to calculate the sum or average of time series csv data in an instant
How to change the MAC address of an automatically created virtual NIC to be event driven
How to find the optimal number of clusters in k-means
How to swap elements in an array in Python, and how to reverse an array.
How to manipulate the DOM in an iframe with Selenium
How to get the last (last) value in a list in Python
How to get all the keys and values in the dictionary
How to get a list of built-in exceptions in python
An introduction to the modern socket API to learn in C
[Shell] How to get the remote default branch in Git
An easy way to hit the Amazon Product API in Python
How to handle multiple versions of CUDA in the same environment
Get the number of PVs of Qiita articles you posted with API
How to determine the existence of a selenium element in Python
How to implement Java code in the background of RedHat (LinuxONE)
How to get all the possible values in a regular expression
How to make a string into an array or an array into a string in Python
How to change the color of just the button pressed in Tkinter
How to get the ID of Type2Tag NXP NTAG213 with nfcpy
How to get followers and followers from python using the Mastodon API
How to check the memory size of a variable in Python
[Python] How to get the first and last days of the month
How to check the memory size of a dictionary in Python
Hit the New Relic API in Python to get the server status
[TensorFlow 2] How to check the contents of Tensor in graph mode
Various ways to create an array of numbers from 1 to 10 in Python.
Create a function to get the contents of the database in Go
Get the number of views of Qiita
How to get the Python version
Get the attributes of an object
[Question] In sk-learn random forest regression, an error occurs when the number of parallels is set to -1.
Error in deep learning "ImportError: DLL load failed: The specified module cannot be found. How to know the "specified module" in.
From the introduction of GoogleCloudPlatform Natural Language API to how to use it
How to resolve "No kernel of grammar Python found" error in Atom
Approach commentary for beginners to be in the top 1.5% (0.83732) of Kaggle Titanic_3
How to get the date and time difference in seconds with python