Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Cannot download an import template via the API

Hello all

I’m trying to download an import template using the


RPC method. But for some reason I keep getting this error

AttributeError: 'NoneType' object has no attribute 'items'

I’m trying these invocations

bench execute frappe.core.doctype.data_import.data_import.download_template --args ‘[“User”]’

bench execute frappe.core.doctype.data_import.data_import.download_template --kwargs ‘{“doctype”:“User”}’

Referring to the list of RPC methods by @revant_one at I also notice that the download_template has no definition of it’s arguments, unlike all the other methods.

Here is the actual code. Pass the parameters accordingly.

Thanks @rtdany10

Yes I tried passing additional parameters as per this function definition. However only the doctype is mandatory. Even so, I still get the same error. Can you execute this bench command?

Not sure if you can run it through bench, doesn’t it return a CSV file? Try running it through a browser.

Invoking the below method in the browser’s address bar"User"

also returns an error


Trying with more arguments also does not work“User”&file_type=“CSV”&export_records=“blank_template”&export_fields=’{“User”:[“name”]}’

Ran using, same error.
Here is the log.
Will try to debug once I’m free.