Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating new products #1423

Open
firaskafri opened this issue Jul 30, 2017 · 1 comment
Open

Error creating new products #1423

firaskafri opened this issue Jul 30, 2017 · 1 comment

Comments

@firaskafri
Copy link

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.
@schenedx
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants