not working show error
dev@24:~/icrm$ bench export-fixtures --app icrm
Exporting Client Script app icrm filters ['name', 'in', ['Owned by']]
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/dev/icrm/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
main()
File "/home/dev/icrm/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
click.Group(commands=commands)(prog_name="bench")
File "/home/dev/icrm/env/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/env/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/dev/icrm/env/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/env/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/env/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/env/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/env/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/apps/frappe/frappe/commands/__init__.py", line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/apps/frappe/frappe/commands/utils.py", line 383, in export_fixtures
export_fixtures(app=app)
File "/home/dev/icrm/apps/frappe/frappe/utils/fixtures.py", line 81, in export_fixtures
export_json(
File "/home/dev/icrm/apps/frappe/frappe/core/doctype/data_import/data_import.py", line 299, in export_json
for doc in frappe.get_all(
^^^^^^^^^^^^^^^
File "/home/dev/icrm/apps/frappe/frappe/__init__.py", line 2057, in get_all
return get_list(doctype, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/apps/frappe/frappe/__init__.py", line 2032, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/apps/frappe/frappe/model/db_query.py", line 191, in execute
result = self.build_and_run()
^^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/apps/frappe/frappe/model/db_query.py", line 206, in build_and_run
args = self.prepare_args()
^^^^^^^^^^^^^^^^^^^
File "/home/dev/icrm/apps/frappe/frappe/model/db_query.py", line 243, in prepare_args
self.sanitize_fields()
File "/home/dev/icrm/apps/frappe/frappe/model/db_query.py", line 413, in sanitize_fields
lower_field = field.lower().strip()
^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'lower'
need to do this
fixtures = [
{
"doctype": "Client Script",
"filters": [
["name", "in", ["name_of_client_script"]]
]
}
]
after this this will work and show
dev@24:~/icrm$ bench export-fixtures --app icrm
Exporting Client Script app icrm filters [['name', 'in', ['Owned by']]]