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

Migration error #194

Open
giasiranisst opened this issue Mar 4, 2020 · 5 comments
Open

Migration error #194

giasiranisst opened this issue Mar 4, 2020 · 5 comments

Comments

@giasiranisst
Copy link

I followed the instructions in order to install Figures on Ironwood but at the final step, I encounter an error.
With command "python.edxapp /edx/bin/manage.edxapp lms migrate figures" I get the error "django.db.utils.OperationalError: unable to open database file"

With command "python.edxapp /edx/bin/manage.edxapp lms syncdb figures" I get the error "manage.edxapp syncdb: error: unrecognized arguments: figures"

With command "python.edxapp /edx/bin/manage.edxapp lms syncdb --settings aws figures" I get the error "AttributeError: 'module' object has no attribute 'update_settings"

How can I fix it?

@shashikiranraifox
Copy link

shashikiranraifox commented Apr 1, 2020

I did a grep of update_settings. I could not find the method definition. I also found there exists to other methods which can be used. Below is the code that worked for me.

if 'figures' in INSTALLED_APPS:
    import figures

    from figures.settings.lms_production import (
        update_celerybeat_schedule,
        update_webpack_loader,
    )
    figures_env_tokens = ENV_TOKENS.get('FIGURES', {})
    update_webpack_loader(WEBPACK_LOADER, figures_env_tokens)

    enable_celerybeat_job = True
    if figures_env_tokens:
        enable_celerybeat_job = figures_env_tokens.get(
            'ENABLE_DAILY_METRICS_IMPORT', True)
    if enable_celerybeat_job:
        update_celerybeat_schedule(CELERYBEAT_SCHEDULE, figures_env_tokens)
   

Note: I found the above code version 0.1.6 codebase.

After this when i run try to access figures in production mode, I get a different error. It states the 'figures/webpack-stats.json' file is missing.
Update: figures/webpack-stats.json is found in PyPI distribution of 0.1.6 but not in latest version[0.3.6]

May be the latest library on PyPi does not contain this file. I am going to check if prior versions of figures have this file. One could also generate a tar.gz afresh after build.

Let me know if you do not hit this problem or found a fix

@shashikiranraifox
Copy link

I did a grep of update_settings. I could not find the method definition. I also found there exists to other methods which can be used. Below is the code that worked for me.

if 'figures' in INSTALLED_APPS:
    import figures

    from figures.settings.lms_production import (
        update_celerybeat_schedule,
        update_webpack_loader,
    )
    figures_env_tokens = ENV_TOKENS.get('FIGURES', {})
    update_webpack_loader(WEBPACK_LOADER, figures_env_tokens)

    enable_celerybeat_job = True
    if figures_env_tokens:
        enable_celerybeat_job = figures_env_tokens.get(
            'ENABLE_DAILY_METRICS_IMPORT', True)
    if enable_celerybeat_job:
        update_celerybeat_schedule(CELERYBEAT_SCHEDULE, figures_env_tokens)
   

Note: I found the above code version 0.1.6 codebase.

After this when i run try to access figures in production mode, I get a different error. It states the 'figures/webpack-stats.json' file is missing.
Update: figures/webpack-stats.json is found in PyPI distribution of 0.1.6 but not in latest version[0.3.6]

May be the latest library on PyPi does not contain this file. I am going to check if prior versions of figures have this file. One could also generate a tar.gz afresh after build.

Let me know if you do not hit this problem or found a fix

I was able to get the older version[0.1.6] working. I guess above mentioned missing file could be the reason why the latest version is not working. Building your own library and adding it on PyPi could fix the issue for you with the latest version.

P.S: I have other issues in 0.1.6 like for some users Jump to user displays Blank Page and Enrollment data mismatch.

@manish-arch
Copy link

I am getting the same error but i am working using bitnami

@manish-arch
Copy link

I am having the version of ironwood

@shashikiranraifox
Copy link

I am having the version of ironwood

I have hinted at the solution in the previous post and also have specified the the source of problem.

Note: I am not sure if figures needs to be upgraded for Ironword.

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

3 participants