Hi there,
For a few days I’m facing with this issue:
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I’m in production, and trying to move an entire website using export fixtures.
I created an app, exported everything I need from the website module.
So far, so good, everything is fine.
…but when I’m trying to install the app on the other site, or when running bench migrate, I’m getting this error:
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0).
The json files look fine, as validation and structure, but still can’t get that working.
Any idea why this is not working even if everything seems to be fine?
this is how it ends every time:
bad json: /home/frappe/frappe-bench/apps/new_website_app/new_website_app/fixtures/portal_settings.json
Traceback (most recent call last):
File “/usr/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 104, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 19, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.8/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 27, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 306, in migrate
migrate(
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 75, in migrate
sync_fixtures()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/fixtures.py”, line 24, in sync_fixtures
import_doc(frappe.get_app_path(app, “fixtures”, fname))
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/data_import.py”, line 186, in import_doc
import_file_by_path(
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 96, in import_file_by_path
docs = read_doc_from_file(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 169, in read_doc_from_file
doc = json.loads(f.read())
File “/usr/lib/python3.8/json/init.py”, line 357, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.8/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.8/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Thank you for your time
any idea would be great