New Data Import Issue

We tried to use the new data import in version 12.We have used this command:bench --site data-import --submit-after-import --doctype sales_invoice --file ~/testfinalfinal.csv
But we have system error that ‘doctype sales_invoice does not exist’.
Am i missing something or this is a bug ? Any point will be appreciated.

For the doc-type parameter; this is a string and should match the name as it appears in Desk. For Sales Invoices, it should simply be ‘Sales Invoice’ (with the single quotes)

Thanks for response .I used bench --site data-import --submit-after-import --doctype ‘Sales Invoice’ --file ~/testfinalfinal.csv but still failed with error message : Got unexpected extra argument (Invoice’)

I suggest you try with the double quotes instead "
I tried this and it is working fine. As per the error message, it seems the text quotes were not properly identified. I am not sure, but it seems you are using two different characters to enclose the text: ’ and `
make sure you use the same character

Thanks for response .With double quote " it accepted it but with error message : DocField’ object has no attribute ‘child_table_df’.
But I have used the new data import to import the similar document (testfinalfinal.csv).I don’t know why it is complaining of DocField. (I am particular about command method because I have large data to import)
Below is the full error message:
File “/usr/lib/python3.6/”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.6/”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 99, in
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 18, in main
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/”, line 26, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/”, line 333, in data_import
import_file(doctype, file_path, import_type, submit_after_import, console=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/”, line 168, in import_file
doctype=doctype, file_path=file_path, data_import=data_import, console=console
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/”, line 47, in init
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/”, line 334, in init
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/”, line 372, in parse_data_from_template
header = Header(i, row, self.doctype, self.raw_data, self.column_to_field_map)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/”, line 800, in init
doctypes.append((col.df.parent, col.df.child_table_df))
AttributeError: ‘DocField’ object has no attribute ‘child_table_df’