Issues installing Figures

Thank you so much for the help:

I tried installing “Figures

But im stuck in the last step:

As the edxapp user, run the following:

./manage.py lms migrate figures

Im getting a “No such file or directory” error…any ideas? I guess theres no manage.py file in the folder im trying to execute the command.

Captura de Pantalla 2020-06-25 a la(s) 12.05.26

When i execute the command inside edx-platform folder i get this error:

Traceback (most recent call last):
File “./manage.py”, line 20, in
from safe_lxml import defuse_xml_libs
ImportError: No module named safe_lxml

Captura de Pantalla 2020-06-25 a la(s) 12.06.47

To be able to execute the manage.py command i had to:

sudo su edxapp -s /bin/bash
cd /edx/app/edxapp
. edxapp_env
. venvs/edxapp/bin/activate
cd edx-platform/
./manage.py lms migrate figures

But now i get this error:

django.core.exceptions.ImproperlyConfigured: Application labels aren’t unique, duplicates: figures

2 Likes

Ok, the solution for the duplicate labels is to go to:

./edx-platform/common/djangoapps/third_party_auth/tests/test_settings.py

and add there and not in lms.env.json your INSTALLED_APP to the variable that already exists.

But now i have a big question…¿How can i access my new installed app?

@john can you help here?

1 Like

Im having problems to understand this step @jill:

At the bottom of the lms/envs/aws.py file, add the following:

if ‘figures’ in INSTALLED_APPS:
import figures
figures.update_settings(
WEBPACK_LOADER,
CELERYBEAT_SCHEDULE,
ENV_TOKENS.get(‘FIGURES’, {}))
IMPORTANT: Make sure that you do the above import AFTER WEBPACK_LOADER and CELERYBEAT_SCHEDULE have been declared in the LMS envs.

In which file and how should i declare WEBPACK_LOADER and CELERYBEAT_SCHEDULE variables? Which should be their value?

Thanks a lot.

Im getting an error TemplateDoesNotExist now, i can connect to figures, but it shows nothing, i think it has something to be with the static files etc…

I was able to install it following this guide but not the official documentation… :frowning:

Can you guide me @jill?

Sorry @Xperez , I haven’t installed figures myself, so am not sure whether it’s working with the latest Open edX.

Since your questions here have drifted far from your original question, could you start a new thread for how to install figures, and see if anyone from Appsembler can help there?

@jill @Xperez I’ve split out the part of the discussion about Figures to a separate thread.

1 Like

THIS is the way to go.

Thanks for splitting the new topic out @antoviaque!

And awesome, glad you found a solution @Xperez :smile:

1 Like

Hello

I am getting error in figure when i am trying access /figures URL

I am using 0.3.4

File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py”, line 185, in inner
return func(*args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py”, line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py”, line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py”, line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/figures/views.py”, line 107, in figures_home
return render(request, ‘figures/index.html’, context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/shortcuts.py”, line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/loader.py”, line 68, in render_to_string
return template.render(context, request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/backends/django.py”, line 66, in render
return self.template.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 207, in render
return self._render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 199, in _render
return self.nodelist.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/loader_tags.py”, line 177, in render
return compiled_parent._render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 199, in _render
return self.nodelist.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/classytags/core.py”, line 153, in render
return self.render_tag(context, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py”, line 93, in render_tag
rendered_contents = nodelist.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/loader_tags.py”, line 72, in render
result = block.nodelist.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/library.py”, line 203, in render
output = self.func(*resolved_args, **resolved_kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/templatetags/webpack_loader.py”, line 12, in render_bundle
tags = utils.get_as_tags(bundle_name, extension=extension, config=config, attrs=attrs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/utils.py”, line 45, in get_as_tags
bundle = _get_bundle(bundle_name, extension, config)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/utils.py”, line 23, in _get_bundle
bundle = get_loader(config).get_bundle(bundle_name)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/utils.py”, line 11, in get_loader
_loaders[config_name] = WebpackLoader(config_name)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/loader.py”, line 22, in init
self.config = load_config(self.name)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/config.py”, line 33, in load_config
return user_config[name]
KeyError: u’FIGURES_APP’
Nov 23 15:45:54 ip-172-31-28-232 [service_variant=lms][django.request][env:sandbox] ERROR [ip-172-31-28-232 12738] [exception.py:135] - Internal Server Error: /figures/
Traceback (most recent call last):
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py”, line 185, in inner
return func(*args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py”, line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py”, line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py”, line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/figures/views.py”, line 107, in figures_home
return render(request, ‘figures/index.html’, context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/shortcuts.py”, line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/loader.py”, line 68, in render_to_string
return template.render(context, request)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/backends/django.py”, line 66, in render
return self.template.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 207, in render
return self._render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 199, in _render
return self.nodelist.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/loader_tags.py”, line 177, in render
return compiled_parent._render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 199, in _render
return self.nodelist.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/classytags/core.py”, line 153, in render
return self.render_tag(context, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/sekizai/templatetags/sekizai_tags.py”, line 93, in render_tag
rendered_contents = nodelist.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/loader_tags.py”, line 72, in render
result = block.nodelist.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/library.py”, line 203, in render
output = self.func(*resolved_args, **resolved_kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/templatetags/webpack_loader.py”, line 12, in render_bundle
tags = utils.get_as_tags(bundle_name, extension=extension, config=config, attrs=attrs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/utils.py”, line 45, in get_as_tags
bundle = _get_bundle(bundle_name, extension, config)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/utils.py”, line 23, in _get_bundle
bundle = get_loader(config).get_bundle(bundle_name)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/utils.py”, line 11, in get_loader
_loaders[config_name] = WebpackLoader(config_name)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/loader.py”, line 22, in init
self.config = load_config(self.name)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/webpack_loader/config.py”, line 33, in load_config
return user_config[name]
KeyError: u’FIGURES_APP’

@prakashsinh_asadiya
I already faced this issue u need the proper configuration u need to install yarn in your frontend folder in your figures and then also add this in openedx static files