Migrations error with master: No JSON object could be decoded

I have just installed ironwood.master and there seems to be a problem with performing

python /edx/app/edxapp/edx-platform/manage.py lms makemigrations --settings=aws

WARNING:py.warnings:/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/init.py:5: DeprecationWarning: Importing ‘lms.djangoapps.courseware’ as ‘courseware’ is no longer supported
warnings.warn(“Importing ‘lms.djangoapps.courseware’ as ‘courseware’ is no longer supported”, DeprecationWarning)

Traceback (most recent call last):
File “/edx/app/edxapp/edx-platform/manage.py”, line 119, in
startup = importlib.import_module(edx_args.startup)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
File “/edx/app/edxapp/edx-platform/lms/startup.py”, line 9, in
settings.INSTALLED_APPS # pylint: disable=pointless-statement
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/init.py”, line 56, in getattr
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/init.py”, line 41, in _setup
self._wrapped = Settings(settings_module)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/conf/init.py”, line 110, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
File “/edx/app/edxapp/edx-platform/lms/envs/aws.py”, line 108, in
ENV_TOKENS = json.load(env_file)
File “/usr/lib/python2.7/json/init.py”, line 291, in load
File “/usr/lib/python2.7/json/init.py”, line 339, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 382, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded

Any ideas whats going on?

python /edx/app/edxapp/edx-platform/manage.py lms makemigrations --settings=production

Try this as you are on ironwood.master branch. Maybe this can help.

Hey @kribby
It’s usually happening when you have a syntax error in you .env.json files.
restoring those files from a backup would be a solution.

1 Like

Thank you @jramnai @mahyard

The problem was due .env.json.