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

SQLITE issue when using docker #191

Open
Manuelbaun opened this issue Sep 15, 2020 · 3 comments
Open

SQLITE issue when using docker #191

Manuelbaun opened this issue Sep 15, 2020 · 3 comments

Comments

@Manuelbaun
Copy link

Manuelbaun commented Sep 15, 2020

Hi Guys,

I followed the example to set up the docker image and when the image starts I get this error in the browser when I open up localhost:8000.

It seems, that it cannot find a table in the SQLite file. Any Idea, how I can fix it?

Request Method: | GET
-- | --
http://localhost:8000/
2.2.14
OperationalError
no such table: workbench_xblockstate
/usr/local/lib/python3.5/dist-packages/django/db/backends/sqlite3/base.py in execute, line 383
/usr/bin/python3
3.5.2
['/usr/local/src/xblock-sdk',  '/usr/lib/python35.zip',  '/usr/lib/python3.5',  '/usr/lib/python3.5/plat-x86_64-linux-gnu',  '/usr/lib/python3.5/lib-dynload',  '/usr/local/lib/python3.5/dist-packages',  '/usr/local/src/xblock-sdk/src/acid-xblock',  '/usr/local/src/xblock-sdk',  '/usr/lib/python3/dist-packages']
Tue, 15 Sep 2020 05:13:07 -0400

here is the link to the share issue site

https://dpaste.com/B5E8EH76M

@taniwallach
Copy link
Contributor

@taniwallach
Copy link
Contributor

After starting the docker container using docker container exec -it xblock-sdk bash
run the following:

docker container exec -it xblock-sdk bash 
python3.8 manage.py migrate

after this http://localhost:8000/ had what should be there.

Note: I am using a modified Dockerfile and have python3.8. The standard one has python3.5 which is deprecated.

Some comments which helped were found in:

@taniwallach
Copy link
Contributor

Note: This does not get persisted after a restart.
Solution: Provide persistant storage for /usr/local/src/xblock-sdk/var
See the approach using a docker-compose.yml file in https://github.com/edx/xblock-sdk/pull/194

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