Pip package problem

Hi,
how can i upgrade my lti_consumer_xblock package version to 4.1.0 from 3.1.1?
i tried my replacing the folder manually but still same error.

You are using an old version of lti_consumer , one of the opencraft dev fixed the bug but you are still using 3.1.* version kindly upgrade to > 3.5.*

One option could be to pip install the package in your openedx image using the patch openedx-dockerfile-post-python-requirements.

Can you please elaborate more ? how can i do this? i am new on edx

I have tried changing version in base.txt then reinstalling pip but same issue occurs which means old code is still running instead of new code, do i have to recomplie for restart anything so my updated pip package runs instead of old ?

Are you familiar with the plugin system in tutor?

Basically, you will need to create a tutor plugin to add RUN pip install lti_consumer_xblock >3.5 to the openedx docker image AFTER the requirements have been installed (i.e. to override the default installation of lti_consumer_xblock ), hence the [specific patch](https://{{ patch(“openedx-dockerfile-post-python-requirements”) }}).

I think you can also use OPENEDX_EXTRA_PIP_REQUIREMENTS in your config.yml. That’s probably a better option. Once you configure it, you will need to rebuild the openedx image tutor images build openedx.

1 Like

Thank you @BbrSofiane .

One more thing is that if i change version in base.txt then pip install and latest version gets installed but it still not working i dont know if its cache or do i have to recompile or run tutor image build openedx? will this proceess resolve my issue?

It depends where you made the change. If it’s in a running container then it won’t be persisted and your changes will disappear when you restart the container.

I wouldn’t recommend changing the content in base.txt :sweat_smile: unless you really know what you are doing.

Yes i will be doing it using the plugin method but right now i have a demo and i cant make the lti plugin work even installing the latest relaese it wont take effect and old code is still running even its not even present there, do i need to recomplile or restart anything?

Can you please tell me the path for this config.yml?

I think you need to add the following your config.yml:

OPENEDX_EXTRA_PIP_REQUIREMENTS: 
  - lti_consumer_xblock>3.5

(I might be wrong in the syntax here because I haven’t used this parameter myself)

Then tutor config save and finally rebuild the docker image with tutor images build openedx (and grab a coffee :coffee: ).

What is the location of config.yml?

The config.yml file is in the tutor root folder which you can find using tutor config printroot.

Thank you so much @BbrSofiane

I have added this “OPENEDX_EXTRA_PIP_REQUIREMENTS” in my config file
image,
then saved my config file, rebuild the image, then tutor local quickstart.

but it still installs the old version 3.1.1.

Why is that?

First, I would check the resulting Dockerfile to make sure the installation command is added.

What do you get when you run grep -rni lti_consumer_xblock $(tutor config printroot)/env?

@BbrSofiane
It worked, using config file method pip package has been updated and permission error which giovaani fixed is no more but now it shows 500 internal server error when i select LTI content to add into edx course, i am using 4.1.0
stage.edx.com too has it fixed but on stage it dont show 500 it actually works there then what am i missing here?

Can you share some logs please? (ideally not screenshots)

caddy_1 | {“level”:“error”,“ts”:1652958505.2367392,“logger”:“tls.obtain”,“msg”:“could not get certificate from issuer”,“identifier”:“apps.edx.curriki.org”,“issuer”:“acme.zerossl.com-v2-DV90”,“error”:“registering account [mailto:caddy@zerossl.com] with server: fetching new nonce from server: HTTP 500: “}
caddy_1 | {“level”:“error”,“ts”:1652958505.2368174,“logger”:“tls.obtain”,“msg”:“will retry”,“error”:”[apps.edx.curriki.org] Obtain: registering account [mailto:caddy@zerossl.com] with server: fetching new nonce from server: HTTP 500: “,“attempt”:3,“retrying_in”:120,“elapsed”:200.916170945,“max_duration”:2592000}
caddy_1 | {“level”:“error”,“ts”:1652958505.2701354,“logger”:“tls.obtain”,“msg”:“could not get certificate from issuer”,“identifier”:“preview.edx.curriki.org”,“issuer”:“acme.zerossl.com-v2-DV90”,“error”:“registering account [mailto:caddy@zerossl.com] with server: fetching new nonce from server: HTTP 500: “}
caddy_1 | {“level”:“error”,“ts”:1652958505.2702086,“logger”:“tls.obtain”,“msg”:“will retry”,“error”:”[preview.edx.curriki.org] Obtain: registering account [mailto:caddy@zerossl.com] with server: fetching new nonce from server: HTTP 500: “,“attempt”:3,“retrying_in”:120,“elapsed”:200.948937865,“max_duration”:2592000}
caddy_1 | {“level”:“info”,“ts”:1652958534.485798,“logger”:“http.log.access.log1”,“msg”:“handled request”,“request”:{“remote_addr”:“198.58.99.225:35958”,“proto”:“HTTP/2.0”,“method”:“GET”,“host”:“tutor.edx.curriki.org”,“uri”:”/”,“tls”:{“resumed”:false,“version”:772,“cipher_suite”:4865,“proto”:“h2”,“proto_mutual”:true,“server_name”:“tutor.edx.curriki.org”}},“user_id”:””,“duration”:0.071684273,“size”:12815,“status”:200}
caddy_1 | {“level”:“info”,“ts”:1652958543.30025,“logger”:“http.log.access.log0”,“msg”:“handled request”,“request”:{“remote_addr”:“198.58.99.225:35972”,“proto”:“HTTP/2.0”,“method”:“GET”,“host”:“edx.curriki.org”,“uri”:"/",“tls”:{“resumed”:false,“version”:772,“cipher_suite”:4865,“proto”:“h2”,“proto_mutual”:true,“server_name”:“edx.curriki.org”}},“user_id”:"",“duration”:1.077239733,“size”:11375,“status”:200}
caddy_1 | {“level”:“info”,“ts”:1652958576.6145191,“logger”:“http.log.access.log0”,“msg”:“handled request”,“request”:{“remote_addr”:“110.36.227.66:21016”,“proto”:“HTTP/2.0”,“method”:“GET”,“host”:“edx.curriki.org”,“uri”:"/api/lti_consumer/v1/launch/?scope=openid&response_type=id_token&response_mode=form_post&prompt=none&nonce=6286256f0ba1e&client_id=70d39ef5-358f-4b1f-9e3b-50f0103f0371&login_hint=block-v1%3AedX%2BDemoX%2BDemo_Course%2Btype%40lti_consumer%2Bblock%40edc98238cbfe4094956e38e0ab168f30&lti_message_hint=deep_linking_launch&redirect_uri=https%3A%2F%2Ftst-tsugi.curriki.org%2Flti%2Foidc_launch&state=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzaWduYXR1cmUiOiIyZmE2ZWMxNzlmZTE2Njc1ZjMzZDNjZWUyNTAyZmRlNDg3Y2M4NDg1MjM4YWRhMzg3OGVlNTBjYjFmZWM1MmUwIiwidGltZSI6MTY1Mjk1ODU3NSwidGFyZ2V0X2xpbmtfdXJpIjoiaHR0cHM6XC9cL2VkeC5jdXJyaWtpLm9yZ1wvYXBpXC9sdGlfY29uc3VtZXJcL3YxXC9sYXVuY2hcLyJ9.9ijl7HT7yqvLaOo77df3lLAIQ1b14vMy0cVy0925oWI",“tls”:{“resumed”:false,“version”:772,“cipher_suite”:4865,“proto”:“h2”,“proto_mutual”:true,“server_name”:“edx.curriki.org”}},“user_id”:"",“duration”:0.471269993,“size”:3152,“status”:200}
caddy_1 | {“level”:“error”,“ts”:1652958592.7379923,“logger”:“http.log.access.log0”,“msg”:“handled request”,“request”:{“remote_addr”:“110.36.227.66:21016”,“proto”:“HTTP/2.0”,“method”:“POST”,“host”:“edx.curriki.org”,“uri”:"/api/lti_consumer/v1/lti/8/lti-dl/response",“tls”:{“resumed”:false,“version”:772,“cipher_suite”:4865,“proto”:“h2”,“proto_mutual”:true,“server_name”:“edx.curriki.org”}},“user_id”:"",“duration”:0.43555842,“size”:9896,“status”:500}

@BbrSofiane
I have a demo to present in 4 hours can you please help me resolve this 500 error? i really appreciate that you are helping me in this

can wes have a short zoom or skype call?