ecommerce icon indicating copy to clipboard operation
ecommerce copied to clipboard

Error creating new products

Open firaskafri opened this issue 8 years ago • 1 comments

We keep getting the following error whenever we try to add a new course the the ecommerce courses dashboard:

Traceback (most recent call last):
  File "/edx/app/ecommerce/ecommerce/ecommerce/courses/publishers.py", line 100, in publish
    commerce_api_client = course.site.siteconfiguration.commerce_api_client
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/edx/app/ecommerce/ecommerce/ecommerce/core/models.py", line 410, in commerce_api_client
    return EdxRestApiClient(self.build_lms_url('/api/commerce/v1/'), jwt=self.access_token)
  File "/edx/app/ecommerce/ecommerce/ecommerce/core/models.py", line 359, in access_token
    token_type='jwt'
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/edx_rest_api_client/client.py", line 42, in get_oauth_access_token
    raise requests.RequestException(response=response)
RequestException
Jul 30 19:57:14 iZgw8ag203r4q8c5wonofaZ [service_variant=ecommerce][ecommerce.extensions.api.serializers] ERROR [iZgw8ag203r4q8c5wonofaZ  9146] [/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/serializers.py:440] - Failed to save and publish [course-v1:Course+Course+course]: [Failed to publish commerce data for course-v1:Course+Course+course to LMS.]
Traceback (most recent call last):
  File "/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/serializers.py", line 437, in save
    raise Exception(resp_message)
Exception: Failed to publish commerce data for course-v1:Course+Course+course to LMS.

firaskafri avatar Jul 30 '17 11:07 firaskafri

@firasalkafri This isn't a good place to get help. you should take a look at https://open.edx.org/getting-help. Just to give you a little help here, please note in https://github.com/edx/ecommerce/tree/master/ecommerce/extensions/api/v2/views/courses.py#L87, you got a switch you can use to turn off the communication. See further documentation at https://github.com/edx/ecommerce/blob/master/docs/additional_features/gate_ecommerce.rst

schenedx avatar Jul 31 '17 17:07 schenedx