Hi,

I am trying to create a new course on the ecommerce platform but encounter 
the following error: "Error! Failed to publish commerce data for 
course-v1:SamsungUni+Sam001+2019Q4 to LMS." (see below for screenshot)

[image: Selection_145.png]



I am using ubuntu 16.04 on AWS and ironwood.master (V2).


The *ecommerce log* outputs indicate the following:


Jul 24 04:11:59 ip-172-31-27-102 
[service_variant=ecommerce][ecommerce.courses.publishers] ERROR 
[ip-172-31-27-102  32431] 
[/edx/app/ecommerce/ecommerce/ecommerce/courses/publishers.py:112] - Failed 
to publish commerce data for [course-v1:SamsungUni+Sam001+2019Q4] to LMS.

Traceback (most recent call last):

  File "/edx/app/ecommerce/ecommerce/ecommerce/courses/publishers.py", line 
100, in publish

    commerce_api_client = 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 457, 
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 384, 
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 142, in get_oauth_access_token

    return get_oauth_access_token(url, client_id, client_secret, 
token_type=token_type)

  File 
"/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/edx_rest_api_client/client.py",
 
line 76, in get_oauth_access_token

    data = response.json()

  File 
"/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/requests/models.py",
 
line 897, in json

    return complexjson.loads(self.text, **kwargs)

  File 
"/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/simplejson/__init__.py",
 
line 518, in loads

    return _default_decoder.decode(s)

  File 
"/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/simplejson/decoder.py",
 
line 370, in decode

    obj, end = self.raw_decode(s)

  File 
"/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/simplejson/decoder.py",
 
line 400, in raw_decode

    return self.scan_once(s, idx=_w(s, idx).end())

JSONDecodeError: Expecting value: line 9 column 1 (char 8)

Jul 24 04:11:59 ip-172-31-27-102 
[service_variant=ecommerce][ecommerce.extensions.api.serializers] ERROR 
[ip-172-31-27-102  32431] 
[/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/serializers.py:585] 
- Failed to save and publish [course-v1:SamsungUni+Sam001+2019Q4]: [Failed 
to publish commerce data for course-v1:SamsungUni+Sam001+2019Q4 to LMS.]

Traceback (most recent call last):

  File 
"/edx/app/ecommerce/ecommerce/ecommerce/extensions/api/serializers.py", 
line 582, in save

    raise Exception(resp_message)

Exception: Failed to publish commerce data for 
course-v1:SamsungUni+Sam001+2019Q4 to LMS.






The *LMS log* outputs indicate the following:


Jul 24 04:24:53 ip-172-31-27-102 
[service_variant=lms][openedx.core.djangoapps.catalog.utils][env:sandbox] 
WARNING [ip-172-31-27-102  32580] [utils.py:103] - Failed to get program 
UUIDs from the cache for site example.com.




I tried changing the WT_PUBLIC_SIGNING_JWK_SET to null in the lms.env.json 
and cms.env.json files (as suggested in this post 
<https://groups.google.com/d/msg/edx-code/cgMseEEKGAg/fJ93_7I-DQAJ>) but it 
doesn't seem to be working



I set up ecommerce using the installation instructions here 
<https://openedx.atlassian.net/wiki/spaces/OpenOPS/pages/110330276/How+to+Install+and+Start+the+E-Commerce+Service+in+Native+Installations>


Can anyone suggest any solutions please?


Thanks in advance


-- 
You received this message because you are subscribed to the Google Groups 
"General Open edX discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to edx-code+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/edx-code/22533283-18ab-48da-9707-20609ccd5084%40googlegroups.com.

Reply via email to