Error on ecommerce launch

After activating the ecommerce plugin, I run tutor local quickstart and end up with this error:

Error: Command failed with status 1: docker-compose -f /Users/andreas/Library/Application Support/tutor/env/local/docker-compose.yml --project-name tutor_local exec ecommerce sh -e -c export DJANGO_SETTINGS_MODULE=ecommerce.settings.tutor
./manage.py migrate --noinput
./manage.py oscar_populate_countries --initial-only

# Development site
./manage.py create_or_update_site \
  --site-id=1 \
  --site-domain=ecommerce.localhost \
  --partner-code=openedx \
  --partner-name="Open edX" \
  --lms-url-root=http://lms:8000 \
  --client-side-payment-processor=cybersource \
  --payment-processors=cybersource,paypal \
  --client-id="ecommerce" \
  --client-secret="CsTOjpw2" \
  --from-email contact@www.myopenedx.com \
  --discovery_api_url=http://discovery:8000/api/v1/

# Production site
./manage.py create_or_update_site \
  --site-id=2 \
  --site-domain=ecommerce.localhost \
  --partner-code=openedx \
  --partner-name="Open edX" \
  --lms-url-root=http://lms:8000 \
  --client-side-payment-processor=cybersource \
  --payment-processors=cybersource,paypal \
  --client-id="ecommerce" \
  --client-secret="CsTOjpw2" \
  --from-email contact@www.myopenedx.com \
  --discovery_api_url=http://discovery:8000/api/v1/

Running Tutor 3.7.0, Plugins (discovery, ecommerce, figures, notes), no other (known) customizations.

Result from tutor local logs --tail=200: https://pastebin.com/pCKLpXan

Yet, everything runs fine when I disable ecommerce and restart. What am I missing?

Would love some insight on this… Did I miss something in config?

@ak00001 Sorry, I missed the notification on your post.
What is the complete error message? Th e pastebin you created has expired.

Thanks, I reproduced the error today as well.

https://pastebin.com/hMWs12FL

Can you please create a pastebin with just the complete output from the command you run? (including the command)

Sorry the tardiness. Here’s a full printout from running tutor local quickstart

https://pastebin.com/cey71GUs

It looks like the basket.0011_add_email_basket_attribute_type migration cannot be applied because it was partially applied before. Maybe it crashed or was brutally interrupted?

Does the mysql database contain data that should be preserved? If not, you can simply trash the database and run quickstart again:

tutor local stop
sudo rm -rf $(tutor config printroot)/data/mysql
tutor local quickstart

If for some reason you may not delete the database, we will have to fake the migration, which requires a little more work. Let me know.

1 Like

Thanks @regis, that did the trick.