Thank you for your reply. If you would look carefully at my post, I have a Traceback.txt
file indicating the posted image’s error.
but I think you’re right so I’ll post it here either way
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 209, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 315, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 239, in query
_mysql.connection.query(self, query)
MySQLdb._exceptions.IntegrityError: (1062, "Duplicate entry '1' for key 'default_site_id'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/openedx/ecommerce/ecommerce/core/management/commands/create_or_update_site.py", line 206, in handle
partner.save()
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 739, in save
self.save_base(using=using, force_insert=force_insert,
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 776, in save_base
updated = self._save_table(
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 858, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 912, in _do_update
return filtered._update(values) > 0
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 802, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql
cursor = super().execute_sql(result_type)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 209, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 315, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 239, in query
_mysql.connection.query(self, query)
django.db.utils.IntegrityError: (1062, "Duplicate entry '1' for key 'default_site_id'")
ERROR: 1
Error: Command failed with status 1: docker-compose -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.yml -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.prod.yml -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.tmp.yml --project-name tutor_local -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.jobs.yml -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.jobs.tmp.yml run --rm ecommerce-job sh -e -c ./manage.py migrate --noinput
./manage.py oscar_populate_countries --initial-only
./manage.py create_or_update_site \
--site-id=1 \
--site-domain=ecommerce.tmtg-clone.click:8130 \
--site-name=dev \
--partner-code=dev \
--partner-name="Open edX - development" \
--lms-url-root="http://tmtg-clone.click:8000" \
--client-side-payment-processor=cybersource \
--payment-processors=cybersource,paypal \
--sso-client-id="ecommerce-sso-dev" \
--sso-client-secret="CTCS23rz" \
--backend-service-client-id="ecommerce-dev" \
--backend-service-client-secret="eMCJ6NtJ" \
--from-email=tmtcoredev@gmail.com \
--payment-support-email=tmtcoredev@gmail.com \
--payment-support-url="http://tmtg-clone.click:8000/support" \
--discovery_api_url=http://discovery.tmtg-clone.click:8381/api/v1/ \
--enable-microfrontend-for-basket-page=true \
--payment-microfrontend-url="http://apps.tmtg-clone.click:1998/payment"
# Production site
./manage.py create_or_update_site \
--site-id=2 \
--site-domain=ecommerce.tmtg-clone.click \
--site-name=prod \
--partner-code=openedx \
--partner-name="Open edX" \
--lms-url-root="https://tmtg-clone.click" \
--lms-public-url-root="https://tmtg-clone.click" \
--client-side-payment-processor=cybersource \
--payment-processors=cybersource,paypal \
--sso-client-id="ecommerce-sso" \
--sso-client-secret="CTCS23rz" \
--backend-service-client-id="ecommerce" \
--backend-service-client-secret="eMCJ6NtJ" \
--from-email=tmtcoredev@gmail.com \
--payment-support-email=tmtcoredev@gmail.com \
--payment-support-url="https://tmtg-clone.click/support" \
--discovery_api_url=https://discovery.tmtg-clone.click/api/v1/ \
--enable-microfrontend-for-basket-page=true \
--payment-microfrontend-url="https://apps.tmtg-clone.click/payment"
also, what are partner codes?