Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Can't build data base properly: column social_url missing

58 views
Skip to first unread message

J David Eisenberg

unread,
Jul 8, 2024, 10:10:49 PM7/8/24
to PreTeXt support
I got rid of the local copy of runestone_dev:

david@david-IdeaPad:~$ sudo systemctl start postgresql
[sudo] password for david:
david@david-IdeaPad:~$ psql -h localhost -U postgres
Password for user postgres:
psql (14.12 (Ubuntu 14.12-0ubuntu0.22.04.1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

postgres=# \d
Did not find any relations.
postgres=# \l
                                    List of databases
     Name      |   Owner   | Encoding |   Collate   |    Ctype    |   Access privileges  
---------------+-----------+----------+-------------+-------------+-----------------------
 postgres      | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 runestone_dev | runestone | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0     | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
               |           |          |             |             | postgres=CTc/postgres
 template1     | postgres  | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
               |           |          |             |             | postgres=CTc/postgres
(4 rows)

postgres=# drop database runestone_dev;
DROP DATABASE
postgres=# \l
                                  List of databases
   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges  
-----------+----------+----------+-------------+-------------+-----------------------
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
(3 rows)

postgres=# \q

# checking to see that postgresql is gone.

david@david-IdeaPad:~$ sudo systemctl stop postgresql

# these are the ones from docker...
david@david-IdeaPad:~$ ps aux | grep post
999         2693  0.0  0.3 218424 28964 ?        Ss   15:54   0:00 postgres
999         2964  0.0  0.0 218424  4480 ?        Ss   15:54   0:00 postgres: checkpointer
999         2965  0.0  0.0 218424  6152 ?        Ss   15:54   0:00 postgres: background writer
999         2966  0.0  0.1 218424 10248 ?        Ss   15:54   0:00 postgres: walwriter
999         2967  0.0  0.1 218976  8964 ?        Ss   15:54   0:00 postgres: autovacuum launcher
999         2968  0.0  0.0  72964  5864 ?        Ss   15:54   0:00 postgres: stats collector
999         2969  0.0  0.0 218852  7232 ?        Ss   15:54   0:00 postgres: logical replication launcher
999         3184  0.0  0.1 219952 13916 ?        Ss   15:54   0:00 postgres: runestone runestone_dev 172.20.0.5(54232) idle in transaction
999         3269  0.0  0.2 220560 17264 ?        Ss   15:54   0:00 postgres: runestone runestone_dev 172.20.0.5(54238) idle

# I then got rid of those with docker stop $(docker ps -aq) and docker rm $(docker ps -aq)

david       4260  0.0  0.0   9080  2224 pts/1    S+   15:56   0:00 grep post

david@david-IdeaPad:~$ sudo systemctl stop docker
Warning: Stopping docker.service, but it can still be activated by:
  docker.socket
david@david-IdeaPad:~$ ps aux | grep post
david       4527  0.0  0.0   9080  2360 pts/1    S+   15:57   0:00 grep post
# OK postgresql is definitely not running now.

# I tried building the server using 3.10, but "book" would not build -- it requires 3.11
# Once I switched my env to 3.11, I did this:

david@david-IdeaPad:~/runestone/rs$ node --version
v22.4.1
david@david-IdeaPad:~/runestone/rs$ npm --version
10.8.1

david@david-IdeaPad:~/runestone/rs$ echo $PATH
/home/david/.nvm/versions/node/v22.4.1/bin:/home/david/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/david/.local/bin:/home/david/bin
david@david-IdeaPad:~/runestone/rs$ poetry install --with=dev
Creating virtualenv rs in /home/david/runestone/rs/.venv
Installing dependencies from lock file

Package operations: 256 installs, 0 updates, 0 removals

  - Installing attrs (23.1.0)
  - Installing rpds-py (0.12.0)
  - Installing referencing (0.30.2)
  - Installing six (1.16.0)
  - Installing jsonschema-specifications (2023.7.1)
  - Installing platformdirs (3.11.0)
  - Installing python-dateutil (2.8.2)
  - Installing traitlets (5.13.0)
  - Installing types-python-dateutil (2.8.19.14)
  - Installing arrow (1.3.0)
  - Installing fastjsonschema (2.18.1)
  - Installing jsonschema (4.19.2)
  - Installing jupyter-core (5.5.0)
  - Installing pycparser (2.21)
  - Installing pyzmq (25.1.1)
  - Installing tornado (6.3.3)
  - Installing cffi (1.16.0)
  - Installing fqdn (1.5.1)
  - Installing idna (3.4)
  - Installing isoduration (20.11.0)
  - Installing jsonpointer (2.4)
  - Installing jupyter-client (8.6.0)
  - Installing markupsafe (2.1.3)
  - Installing nbformat (5.9.2)
  - Installing ptyprocess (0.7.0)
  - Installing rfc3339-validator (0.1.4)
  - Installing rfc3986-validator (0.1.1)
  - Installing soupsieve (2.5)
  - Installing uri-template (1.3.0)
  - Installing webcolors (1.13)
  - Installing webencodings (0.5.1)
  - Installing argon2-cffi-bindings (21.2.0)
  - Installing beautifulsoup4 (4.12.2)
  - Installing bleach (6.1.0)
  - Installing defusedxml (0.7.1)
  - Installing exceptiongroup (1.1.3)
  - Installing jinja2 (3.0.3)
  - Installing jupyterlab-pygments (0.2.2)
  - Installing mistune (3.0.2)
  - Installing nbclient (0.9.0)
  - Installing packaging (23.2)
  - Installing pandocfilters (1.5.0)
  - Installing pygments (2.16.1)
  - Installing python-json-logger (2.0.7)
  - Installing pyyaml (6.0.1)
  - Installing sniffio (1.3.0)
  - Installing terminado (0.17.1)
  - Installing tinycss2 (1.2.1)
  - Installing zipp (3.17.0)
  - Installing anyio (3.7.1)
  - Installing argon2-cffi (23.1.0)
  - Installing certifi (2023.7.22)
  - Installing charset-normalizer (3.3.2)
  - Installing cloudpickle (3.0.0)
  - Installing importlib-metadata (6.8.0)
  - Installing jupyter-events (0.9.0)
  - Installing jupyter-server-terminals (0.4.4)
  - Installing mdurl (0.1.2)
  - Installing nbconvert (7.11.0)
  - Installing overrides (7.4.0)
  - Installing prometheus-client (0.18.0)
  - Installing send2trash (1.8.2)
  - Installing typing-extensions (4.8.0)
  - Installing urllib3 (1.26.13)
  - Installing websocket-client (1.6.4)
  - Installing alabaster (0.7.13)
  - Installing annotated-types (0.6.0)
  - Installing babel (2.13.1)
  - Installing docutils (0.19)
  - Installing doit (0.36.0)
  - Installing imagesize (1.4.1)
  - Installing json5 (0.9.14)
  - Installing jupyter-server (2.10.0)
  - Installing markdown-it-py (2.2.0)
  - Installing pydantic-core (2.10.1)
  - Installing requests (2.31.0)
  - Installing smmap (5.0.1)
  - Installing snowballstemmer (2.2.0)
  - Installing sphinxcontrib-applehelp (1.0.7)
  - Installing sphinxcontrib-devhelp (1.0.5)
  - Installing sphinxcontrib-htmlhelp (2.0.4)
  - Installing sphinxcontrib-jsmath (1.0.1)
  - Installing sphinxcontrib-qthelp (1.0.6)
  - Installing sphinxcontrib-serializinghtml (1.1.9)
  - Installing vine (5.1.0)
  - Installing wcwidth (0.2.9)
  - Installing amqp (5.2.0)
  - Installing async-generator (1.10)
  - Installing async-timeout (4.0.3)
  - Installing click (8.1.7)
  - Installing configobj (5.0.8)
  - Installing gitdb (4.0.11)
  - Installing greenlet (3.0.3)
  - Installing itsdangerous (2.1.2)
  - Installing jmespath (1.0.1)
  - Installing jupyterlab-server (2.25.1)
  - Installing jupyterlite-core (0.2.0)
  - Installing lxml (4.9.3)
  - Installing mdit-py-plugins (0.3.5)
  - Installing outcome (1.3.0.post0)
  - Installing paver (1.3.4)
  - Installing pillow (10.1.0)
  - Installing prompt-toolkit (3.0.43)
  - Installing psycopg (3.1.12)
  - Installing pydantic (2.4.2)
  - Installing pyee (11.0.1)
  - Installing pymupdfb (1.23.6)
  - Installing pypdf2 (2.5.0)
  - Installing pypng (0.20220715.0)
  - Installing python-dotenv (1.0.0)
  - Installing pytz (2023.3.post1)
  - Installing pytzdata (2020.1)
  - Installing sortedcontainers (2.4.0)
  - Installing sphinx (5.3.0)
  - Installing sqlparse (0.4.4)
  - Installing starlette (0.27.0)
  - Installing tabulate (0.9.0)
  - Installing tenacity (8.2.3)
  - Installing werkzeug (3.0.1)
  - Installing wheel (0.41.3)
  - Installing zope-event (5.0)
  - Installing zope-interface (6.1)
  - Installing ansi2html (1.8.0)
  - Installing asttokens (2.4.1)
  - Installing asyncpg (0.28.0)
  - Installing billiard (4.2.0)
  - Installing botocore (1.31.81): Installing...
  - Installing brotli (1.1.0)
  - Installing cli-helpers (2.3.0)
  - Installing click-didyoumean (0.3.0)
  - Installing click-log (0.4.0)
  - Installing click-plugins (1.1.1)
  - Installing click-repl (0.3.0)
  - Installing codechat (1.9.3)
  - Installing cogapp (3.3.0)
  - Installing dash-core-components (2.0.0)
  - Installing dash-html-components (2.0.0)
  - Installing dash-table (5.0.0)
  - Installing dateutils (0.6.12)
  - Installing dill (0.3.7)
  - Installing executing (2.0.1)
  - Installing fastapi (0.103.2)
  - Installing flask (1.1.2)
  - Installing gevent (23.9.1): Installing...
  - Installing ghp-import (2.1.0)
  - Installing ghp-import (2.1.0)
  - Installing gevent (23.9.1)
  - Installing ghp-import (2.1.0)
  - Installing gitpython (3.1.40)
  - Installing json2xml (3.21.0)
  - Installing jupyterlite-sphinx (0.9.3)
  - Installing kombu (5.3.3)
  - Installing myst-parser (1.0.0)
  - Installing nest-asyncio (1.5.8)
  - Installing numpy (1.25.2): Installing...
  - Installing parso (0.8.4)
  - Installing parso (0.8.4)
  - Installing numpy (1.25.2)
  - Installing parso (0.8.4)
  - Installing brotli (1.1.0)
  - Installing cli-helpers (2.3.0)
  - Installing click-didyoumean (0.3.0)
  - Installing click-log (0.4.0)
  - Installing click-plugins (1.1.1)
  - Installing click-repl (0.3.0)
  - Installing codechat (1.9.3)
  - Installing cogapp (3.3.0)
  - Installing dash-core-components (2.0.0)
  - Installing dash-html-components (2.0.0)
  - Installing dash-table (5.0.0)
  - Installing dateutils (0.6.12)
  - Installing dill (0.3.7)
  - Installing executing (2.0.1)
  - Installing fastapi (0.103.2)
  - Installing flask (1.1.2)
  - Installing gevent (23.9.1)
  - Installing ghp-import (2.1.0)
  - Installing gitpython (3.1.40)
  - Installing json2xml (3.21.0)
  - Installing jupyterlite-sphinx (0.9.3)
  - Installing kombu (5.3.3)
  - Installing myst-parser (1.0.0)
  - Installing nest-asyncio (1.5.8)
  - Installing numpy (1.25.2)
  - Installing parso (0.8.4)
  - Installing botocore (1.31.81)
  - Installing brotli (1.1.0)
  - Installing cli-helpers (2.3.0)
  - Installing click-didyoumean (0.3.0)
  - Installing click-log (0.4.0)
  - Installing click-plugins (1.1.1)
  - Installing click-repl (0.3.0)
  - Installing codechat (1.9.3)
  - Installing cogapp (3.3.0)
  - Installing dash-core-components (2.0.0)
  - Installing dash-html-components (2.0.0)
  - Installing dash-table (5.0.0)
  - Installing dateutils (0.6.12)
  - Installing dill (0.3.7)
  - Installing executing (2.0.1)
  - Installing fastapi (0.103.2)
  - Installing flask (1.1.2)
  - Installing gevent (23.9.1)
  - Installing ghp-import (2.1.0)
  - Installing gitpython (3.1.40)
  - Installing json2xml (3.21.0)
  - Installing jupyterlite-sphinx (0.9.3)
  - Installing kombu (5.3.3)
  - Installing myst-parser (1.0.0)
  - Installing nest-asyncio (1.5.8)
  - Installing numpy (1.25.2)
  - Installing parso (0.8.4)
  - Installing pdfcropmargins (1.0.9)
  - Installing pendulum (2.1.2)
  - Installing pgspecial (2.1.1)
  - Installing playwright (1.41.2)
  - Installing plotly (5.18.0)
  - Installing psutil (5.9.6)
  - Installing psycopg2-binary (2.9.9)
  - Installing pure-eval (0.2.2)
  - Installing pydal (20230521.1)
  - Installing pydantic-settings (2.0.3)
  - Installing pydantic-xml (2.4.0)
  - Installing pyhumps (3.8.0)
  - Installing pymupdf (1.23.6)
  - Installing pyparsing (3.1.1)
  - Installing qrcode (7.4.2)
  - Installing redis (4.6.0)
  - Installing retrying (1.3.4)
  - Installing setproctitle (1.3.3)
  - Installing single-version (1.6.0)
  - Installing sphinx-reredirects (0.1.3)
  - Installing sphinxcontrib-paverutils (1.17.0)
  - Installing sqlalchemy (1.4.50)
  - Installing toml (0.10.2)
  - Installing trio (0.21.0)
  - Installing tzdata (2023.3)
  - Installing aiotk (0.5.0)
  - Installing astroid (3.0.1)
  - Installing asyncclick (8.1.3.4)
  - Installing celery (5.3.4)
  - Installing configargparse (1.7)
  - Installing coverage (6.5.0)
  - Installing dash (2.14.1): Pending...
  - Installing decorator (5.1.1)
  - Installing diskcache (5.6.3)
  - Installing docopt (0.6.2)
  - Installing entrypoints (0.4)
  - Installing flask-basicauth (0.2.0)
  - Installing flask-cors (4.0.0)
  - Installing geventhttpclient (2.0.11)
  - Installing h11 (0.14.0)
  - Installing iniconfig (2.0.0)
  - Installing decorator (5.1.1)
  - Installing diskcache (5.6.3)
  - Installing docopt (0.6.2)
  - Installing entrypoints (0.4)
  - Installing flask-basicauth (0.2.0)
  - Installing flask-cors (4.0.0)
  - Installing geventhttpclient (2.0.11)
  - Installing h11 (0.14.0)
  - Installing iniconfig (2.0.0)
  - Installing dash (2.14.1): Installing...
  - Installing decorator (5.1.1)
  - Installing diskcache (5.6.3)
  - Installing docopt (0.6.2)
  - Installing entrypoints (0.4)
  - Installing flask-basicauth (0.2.0)
  - Installing flask-cors (4.0.0)
  - Installing geventhttpclient (2.0.11)
  - Installing h11 (0.14.0)
  - Installing iniconfig (2.0.0)
  - Installing decorator (5.1.1)
  - Installing diskcache (5.6.3)
  - Installing docopt (0.6.2)
  - Installing entrypoints (0.4)
  - Installing flask-basicauth (0.2.0)
  - Installing flask-cors (4.0.0)
  - Installing geventhttpclient (2.0.11)
  - Installing h11 (0.14.0)
  - Installing iniconfig (2.0.0)
  - Installing dash (2.14.1)
  - Installing decorator (5.1.1)
  - Installing diskcache (5.6.3)
  - Installing docopt (0.6.2)
  - Installing entrypoints (0.4)
  - Installing flask-basicauth (0.2.0)
  - Installing flask-cors (4.0.0)
  - Installing geventhttpclient (2.0.11)
  - Installing h11 (0.14.0)
  - Installing iniconfig (2.0.0)
  - Installing httplib2 (0.22.0)
  - Installing isort (5.12.0)
  - Installing jedi (0.19.1)
  - Installing mako (1.3.2)
  - Installing matplotlib-inline (0.1.6)
  - Installing mccabe (0.6.1)
  - Installing msgpack (1.0.7)
  - Installing multiprocess (0.70.15)
  - Installing mypy-extensions (1.0.0)
  - Installing pandas (1.5.3)
  - Installing pathspec (0.11.2)
  - Installing pexpect (4.9.0)
  - Installing pgcli (3.5.0)
  - Installing pluggy (1.3.0)
  - Installing pretext (2.3.1)
  - Installing pycodestyle (2.8.0)
  - Installing pyflakes (2.4.0)
  - Installing pyjwt (2.8.0)
  - Installing python-multipart (0.0.6)
  - Installing s3transfer (0.7.0)
  - Installing stack-data (0.6.3)
  - Installing tomli (2.0.1)
  - Installing tomlkit (0.12.2)
  - Installing toolz (0.12.0)
  - Installing wtforms (3.1.1)
  - Installing runestone (7.2.11 /home/david/runestone/rs/projects/interactives)
  - Installing aiofiles (0.8.0)
  - Installing aioredis (2.0.1)
  - Installing aiosqlite (0.18.0)
  - Installing alembic (1.13.1)
  - Installing altair (4.2.2)
  - Installing black (23.11.0)
  - Installing boto3 (1.28.81)
  - Installing contextlib2 (0.6.0.post1)
  - Installing coveralls (3.3.1)
  - Installing cryptography (3.4.8)
  - Installing cssselect (1.2.0)
  - Installing dash-bootstrap-components (1.5.0)
  - Installing diff-match-patch (20230430)
  - Installing fastapi-login (1.10.0)
  - Installing flake8 (4.0.1)
  - Installing gunicorn (20.1.0)
  - Installing html5validator (0.3.3)
  - Installing ipython (8.23.0)
  - Installing locust (1.6.0)
  - Installing mock (4.0.3)
  - Installing multi-await (1.0.4)
  - Installing mypy (1.6.1)
  - Installing oauth2 (1.9.0.post1)
  - Installing polling2 (0.5.0)
  - Installing pycryptodome (3.19.0)
  - Installing pylint (3.0.2)
  - Installing pytest (7.4.3)
  - Installing pyvirtualdisplay (3.0)
  - Installing rich (13.6.0)
  - Installing selenium (3.141.0)
  - Installing sphinx-click (4.4.0)
  - Installing starlette-wtf (0.4.3)
  - Installing stripe (2.76.0)
  - Installing tqdm (4.66.1)
  - Installing uvicorn (0.27.0.post1)
  - Installing rsmanage (2.0.0 /home/david/runestone/rs/projects/rsmanage)

Installing the current project: rs (7.0.0)

# Then built the servers:
(rs-py3.11) david@david-IdeaPad:~/runestone/rs$ python ./build.py
Checking your environment
  Environment Variables     
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━┓
          Variable Set
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━┩
    RUNESTONE_PATH Yes
    RUNESTONE_HOST Yes
     SERVER_CONFIG Yes
         BOOK_PATH Yes
     WEB2PY_CONFIG Yes
        JWT_SECRET Yes
WEB2PY_PRIVATE_KEY Yes
  COMPOSE_PROFILES Yes
             DBURL Yes
         DEV_DBURL Yes
          DC_DBURL Yes
      DC_DEV_DBURL Yes
└────────────────────┴─────┘
Basic profile enabled
                        Build Python Wheels                           
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
           Wheel Built                                           
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
    interactives Fail See ./projects/interactives/build.log      
              db Skipped                                         
       pgbouncer Skipped                                         
            jobe Skipped                                         
            book Yes                                             
       runestone Yes                                             
      assignment Fail See ./projects/assignment_server/build.log
           nginx Skipped                                         
nginx_dstart_dev Skipped                                         
        rsmanage Yes                                             
└──────────────────┴─────────────────────────────────────────────────┘
Building docker images (see build.log for detailed progress)...
    Build Docker Images       
    Build Docker Images      
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
     Service Built      
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
interactives skipped...
          db Yes        
   pgbouncer Yes        
        jobe Yes        
        book Yes        
   runestone Yes        
  assignment Failed     
└──────────────┴────────────┘

# Built the database...
(rs-py3.11) david@david-IdeaPad:~/runestone/rs$ docker compose --profile basic up -d db
WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_SERVER" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_LOGIN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
[+] Running 1/1
 ✔ Container rs-db-1  Started                                                                                                                                                                0.3s
(rs-py3.11) david@david-IdeaPad:~/runestone/rs$ docker compose run rsmanage rsmanage initdb
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_SERVER" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_LOGIN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
INFO - 2024-07-09 01:36:54,394 - Settings - Error path is /usr/books/tickets
You may want to define the DC_DEV_DBURL environment variable
You may want to define the DC_DBURL environment variable
Using configuration: development
Using database: runestone_dev
Checking database connection
postgresql+asyncpg://runestone:runestone@db/runestone_dev
Database connection successful
You may want to define the DC_DEV_DBURL environment variable
You may want to define the DC_DBURL environment variable
Initializing the database
/usr/local/lib/python3.10/site-packages/pydantic/main.py:308: UserWarning: Pydantic serializer warnings:
  Expected `bool` but got `ColumnDefault` - serialized value may not be as expected
  return self.__pydantic_serializer__.to_python(
ERROR - 2024-07-09 01:36:56,546 - read_key - No Key file is found will default to settings.jwt_secret
(rs-py3.11) david@david-IdeaPad:~/runestone/rs$ alembic stamp head
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
INFO  [alembic.runtime.migration] Running stamp_revision  -> 526d79dc9a8f

# and started up the servers:

(rs-py3.11) david@david-IdeaPad:~/runestone/rs$ docker compose --profile basic up
WARN[0000] The "HOSTNAME" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
WARN[0000] The "LOAD_BALANCER_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_SERVER" variable is not set. Defaulting to a blank string.
WARN[0000] The "EMAIL_LOGIN" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "SPACES_SECRET" variable is not set. Defaulting to a blank string.
[+] Running 8/8
 ✔ Container rs-redis-1       Created                                                                                                                                                        0.1s
 ✔ Container rs-jobe-1        Created                                                                                                                                                        0.1s
 ✔ Container rs-rsmanage-1    Created                                                                                                                                                        0.1s
 ✔ Container rs-db-1          Running                                                                                                                                                        0.0s
 ✔ Container rs-assignment-1  Created                                                                                                                                                        0.1s
 ✔ Container rs-book-1        Created                                                                                                                                                        0.1s
 ✔ Container rs-runestone-1   Created                                                                                                                                                        0.1s
 ✔ Container rs-nginx-1       Created                                                                                                                                                        0.1s
Attaching to assignment-1, book-1, db-1, jobe-1, nginx-1, redis-1, rsmanage-1, runestone-1
redis-1       | 1:C 09 Jul 2024 01:38:32.637 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-1       | 1:C 09 Jul 2024 01:38:32.637 # Redis version=6.2.14, bits=64, commit=00000000, modified=0, pid=1, just started
redis-1       | 1:C 09 Jul 2024 01:38:32.637 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-1       | 1:M 09 Jul 2024 01:38:32.638 * monotonic clock: POSIX clock_gettime
redis-1       | 1:M 09 Jul 2024 01:38:32.638 * Running mode=standalone, port=6379.
redis-1       | 1:M 09 Jul 2024 01:38:32.638 # Server initialized
redis-1       | 1:M 09 Jul 2024 01:38:32.638 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-1       | 1:M 09 Jul 2024 01:38:32.638 * Ready to accept connections
jobe-1        | [Tue Jul 09 01:38:33.013469 2024] [core:warn] [pid 8] AH00098: pid file /var/run/apache2/apache2.pid overwritten -- Unclean shutdown of previous Apache run?
jobe-1        | [Tue Jul 09 01:38:33.015928 2024] [mpm_prefork:notice] [pid 8] AH00163: Apache/2.4.52 (Ubuntu) configured -- resuming normal operations
jobe-1        | [Tue Jul 09 01:38:33.015946 2024] [core:notice] [pid 8] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
rsmanage-1 exited with code 0
nginx-1       | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx-1       | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx-1       | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx-1       | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
nginx-1       | /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
nginx-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx-1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx-1       | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: using the "epoll" event method
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: nginx/1.25.3
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14)
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: OS: Linux 5.15.0-113-generic
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: start worker processes
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: start worker process 28
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: start worker process 29
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: start worker process 30
nginx-1       | 2024/07/09 01:38:33 [notice] 1#1: start worker process 31
runestone-1   | [2024-07-09 01:38:33 +0000] [9] [DEBUG] Current configuration:
runestone-1   |   config: ./gunicorn.conf.py
runestone-1   |   wsgi_app: None
runestone-1   |   bind: ['0.0.0.0:8112']
runestone-1   |   backlog: 2048
runestone-1   |   workers: 3
runestone-1   |   worker_class: sync
runestone-1   |   threads: 1
runestone-1   |   worker_connections: 1000
runestone-1   |   max_requests: 0
runestone-1   |   max_requests_jitter: 0
runestone-1   |   timeout: 30
runestone-1   |   graceful_timeout: 30
runestone-1   |   keepalive: 2
runestone-1   |   limit_request_line: 4094
runestone-1   |   limit_request_fields: 100
runestone-1   |   limit_request_field_size: 8190
runestone-1   |   reload: False
runestone-1   |   reload_engine: auto
runestone-1   |   reload_extra_files: []
runestone-1   |   spew: False
runestone-1   |   check_config: False
runestone-1   |   print_config: False
runestone-1   |   preload_app: False
runestone-1   |   sendfile: None
runestone-1   |   reuse_port: False
runestone-1   |   chdir: /usr/src/app
runestone-1   |   daemon: False
runestone-1   |   raw_env: []
runestone-1   |   pidfile: None
runestone-1   |   worker_tmp_dir: None
runestone-1   |   user: 0
runestone-1   |   group: 0
runestone-1   |   umask: 0
runestone-1   |   initgroups: False
runestone-1   |   tmp_upload_dir: None
runestone-1   |   secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}
runestone-1   |   forwarded_allow_ips: ['127.0.0.1']
runestone-1   |   accesslog: None
runestone-1   |   disable_redirect_access_to_syslog: False
runestone-1   |   access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
runestone-1   |   errorlog: -
runestone-1   |   loglevel: debug
runestone-1   |   capture_output: False
runestone-1   |   logger_class: gunicorn.glogging.Logger
runestone-1   |   logconfig: None
runestone-1   |   logconfig_dict: {}
runestone-1   |   logconfig_json: None
runestone-1   |   syslog_addr: udp://localhost:514
runestone-1   |   syslog: False
runestone-1   |   syslog_prefix: None
runestone-1   |   syslog_facility: user
runestone-1   |   enable_stdio_inheritance: False
runestone-1   |   statsd_host: None
runestone-1   |   dogstatsd_tags:
runestone-1   |   statsd_prefix:
runestone-1   |   proc_name: None
runestone-1   |   default_proc_name: rsptx.web2py_server.wsgihandler:application
runestone-1   |   pythonpath: None
runestone-1   |   paste: None
runestone-1   |   on_starting: <function OnStarting.on_starting at 0x7f829787ce50>
runestone-1   |   on_reload: <function OnReload.on_reload at 0x7f829787cf70>
runestone-1   |   when_ready: <function WhenReady.when_ready at 0x7f829787d090>
runestone-1   |   pre_fork: <function Prefork.pre_fork at 0x7f829787d1b0>
runestone-1   |   post_fork: <function Postfork.post_fork at 0x7f829787d2d0>
runestone-1   |   post_worker_init: <function PostWorkerInit.post_worker_init at 0x7f829787d3f0>
runestone-1   |   worker_int: <function WorkerInt.worker_int at 0x7f829787d510>
runestone-1   |   worker_abort: <function WorkerAbort.worker_abort at 0x7f829787d630>
runestone-1   |   pre_exec: <function PreExec.pre_exec at 0x7f829787d750>
runestone-1   |   pre_request: <function PreRequest.pre_request at 0x7f829787d870>
runestone-1   |   post_request: <function PostRequest.post_request at 0x7f829787d900>
runestone-1   |   child_exit: <function ChildExit.child_exit at 0x7f829787da20>
runestone-1   |   worker_exit: <function WorkerExit.worker_exit at 0x7f829787db40>
runestone-1   |   nworkers_changed: <function NumWorkersChanged.nworkers_changed at 0x7f829787dc60>
runestone-1   |   on_exit: <function OnExit.on_exit at 0x7f829787dd80>
runestone-1   |   ssl_context: <function NewSSLContext.ssl_context at 0x7f829787dea0>
runestone-1   |   proxy_protocol: False
runestone-1   |   proxy_allow_ips: ['127.0.0.1']
runestone-1   |   keyfile: None
runestone-1   |   certfile: None
runestone-1   |   ssl_version: 2
runestone-1   |   cert_reqs: 0
runestone-1   |   ca_certs: None
runestone-1   |   suppress_ragged_eofs: True
runestone-1   |   do_handshake_on_connect: False
runestone-1   |   ciphers: None
runestone-1   |   raw_paste_global_conf: []
runestone-1   |   strip_header_spaces: False
runestone-1   | [2024-07-09 01:38:33 +0000] [9] [INFO] Starting gunicorn 21.2.0
runestone-1   | [2024-07-09 01:38:33 +0000] [9] [DEBUG] Arbiter booted
runestone-1   | [2024-07-09 01:38:33 +0000] [9] [INFO] Listening at: http://0.0.0.0:8112 (9)
runestone-1   | [2024-07-09 01:38:33 +0000] [9] [INFO] Using worker: sync
runestone-1   | [2024-07-09 01:38:33 +0000] [10] [INFO] Booting worker with pid: 10
book-1        | INFO:     Uvicorn running on http://0.0.0.0:8111 (Press CTRL+C to quit)
book-1        | INFO:     Started parent process [1]
runestone-1   | [2024-07-09 01:38:34 +0000] [11] [INFO] Booting worker with pid: 11
assignment-1  | INFO:     Uvicorn running on http://0.0.0.0:8113 (Press CTRL+C to quit)
assignment-1  | INFO:     Started parent process [1]
runestone-1   | [2024-07-09 01:38:34 +0000] [12] [INFO] Booting worker with pid: 12
runestone-1   | [2024-07-09 01:38:34 +0000] [9] [DEBUG] 3 workers
runestone-1   | WARNING:root:Unable to import plural rules: No module named 'gluon.contrib.plural_rules'
runestone-1   | WARNING:root:Unable to import plural rules: No module named 'gluon.contrib.plural_rules'
runestone-1   | WARNING:root:Unable to import plural rules: No module named 'gluon.contrib.plural_rules'
runestone-1   | WARNING:root:Unable to import plural rules: No module named 'gluon.contrib.plural_rules'
runestone-1   | web2py Web Framework
runestone-1   | Created by Massimo Di Pierro, Copyright 2007-2024
runestone-1   | Version 2.23.1-stable+timestamp.2023.01.31.08.01.46
runestone-1   | Database drivers available: sqlite3, psycopg2, imaplib
runestone-1   | tickets2db.py:40: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.  Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
runestone-1   |   traceback = Table("traceback", meta, autoload=True, autoload_with=engine)
assignment-1  | INFO - 2024-07-09 01:38:37,500 - Settings - Error path is /usr/books/tickets
assignment-1  | INFO - 2024-07-09 01:38:37,503 - Settings - Error path is /usr/books/tickets
assignment-1  | INFO - 2024-07-09 01:38:37,507 - Settings - Error path is /usr/books/tickets
assignment-1  | INFO - 2024-07-09 01:38:40,499 - <module> - Serving books from /usr/books.
assignment-1  |
assignment-1  | INFO - 2024-07-09 01:38:40,499 - <module> - Serving books from /usr/books.
assignment-1  |
assignment-1  | INFO - 2024-07-09 01:38:40,500 - <module> - Serving books from /usr/books.
assignment-1  |
assignment-1  | INFO:     Started server process [8]
assignment-1  | INFO:     Waiting for application startup.
assignment-1  | INFO:     Application startup complete.
assignment-1  | INFO:     Started server process [9]
assignment-1  | INFO:     Waiting for application startup.
assignment-1  | INFO:     Started server process [7]
assignment-1  | INFO:     Application startup complete.
assignment-1  | INFO:     Waiting for application startup.
assignment-1  | INFO:     Application startup complete.
book-1        | INFO - 2024-07-09 01:38:42,374 - <module> - Serving books from /usr/books.
book-1        |
book-1        | INFO - 2024-07-09 01:38:42,379 - <module> - Serving books from /usr/books.
book-1        |
book-1        | INFO - 2024-07-09 01:38:42,387 - <module> - Serving books from /usr/books.
book-1        |
book-1        | INFO - 2024-07-09 01:38:42,400 - <module> - Serving books from /usr/books.
book-1        |
book-1        | INFO:     Started server process [8]
book-1        | INFO:     Waiting for application startup.
book-1        | INFO - 2024-07-09 01:38:42,421 - lifespan - Book Server is Starting Up
book-1        | INFO:     Application startup complete.
book-1        | INFO:     Started server process [11]
book-1        | INFO:     Waiting for application startup.
book-1        | INFO - 2024-07-09 01:38:42,424 - lifespan - Book Server is Starting Up
book-1        | INFO:     Application startup complete.
book-1        | INFO:     Started server process [10]
book-1        | INFO:     Waiting for application startup.
book-1        | INFO - 2024-07-09 01:38:42,430 - lifespan - Book Server is Starting Up
book-1        | INFO:     Application startup complete.
book-1        | INFO:     Started server process [12]
book-1        | INFO:     Waiting for application startup.
book-1        | INFO:     Application startup complete.
book-1        | INFO - 2024-07-09 01:38:42,453 - lifespan - Book Server is Starting Up
book-1        | INFO - 2024-07-09 01:38:42,469 - <module> - Serving books from /usr/books.
book-1        |
book-1        | INFO:     Started server process [9]
book-1        | INFO:     Waiting for application startup.
book-1        | INFO - 2024-07-09 01:38:42,496 - lifespan - Book Server is Starting Up
book-1        | INFO:     Application startup complete.

# And here’s an error when trying to access http://localhost/ns/books/index

nginx-1       | 172.20.0.1 - - [09/Jul/2024:01:39:36 +0000] "GET /runestone/static/js/jquery.js HTTP/1.1" 200 89476 "http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
nginx-1       | 172.20.0.1 - [09/Jul/2024:01:39:36 +0000] Request: "GET /runestone/static/js/jquery.js HTTP/1.1" Status: 200 Bytes: 89476 RequestTime: 0.002 Referrer: "http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
nginx-1       | 172.20.0.1 - - [09/Jul/2024:01:39:36 +0000] "GET /runestone/static/js/web2py.js HTTP/1.1" 200 4768 "http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
nginx-1       | 172.20.0.1 - [09/Jul/2024:01:39:36 +0000] Request: "GET /runestone/static/js/web2py.js HTTP/1.1" Status: 200 Bytes: 4768 RequestTime: 0.002 Referrer: "http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
nginx-1       | 2024/07/09 01:39:36 [notice] 28#28: *5 "^/ads.txt" does not match "/runestone/static/images/RAIcon.png", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/images/RAIcon.png HTTP/1.1", host: "localhost", referrer: "http://localhost/user/login"
nginx-1       | 2024/07/09 01:39:36 [notice] 28#28: *5 "^/runestone/static/JavaReview/(\w+)/(.*)$" does not match "/runestone/static/images/RAIcon.png", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/images/RAIcon.png HTTP/1.1", host: "localhost", referrer: "http://localhost/user/login"
nginx-1       | 2024/07/09 01:39:36 [notice] 28#28: *5 "^/runestone/static/csawesome/(\w+)/(.*)$" does not match "/runestone/static/images/RAIcon.png", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/images/RAIcon.png HTTP/1.1", host: "localhost", referrer: "http://localhost/user/login"
runestone-1   | [2024-07-09 01:39:36 +0000] [11] [DEBUG] GET /runestone/static/images/RAIcon.png
nginx-1       | 172.20.0.1 - - [09/Jul/2024:01:39:36 +0000] "GET /runestone/static/images/RAIcon.png HTTP/1.1" 200 153187 "http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
nginx-1       | 172.20.0.1 - [09/Jul/2024:01:39:36 +0000] Request: "GET /runestone/static/images/RAIcon.png HTTP/1.1" Status: 200 Bytes: 153187 RequestTime: 0.001 Referrer: "http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
nginx-1       | 2024/07/09 01:39:37 [notice] 28#28: *5 "^/ads.txt" does not match "/runestone/static/favicon.ico", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/favicon.ico HTTP/1.1", host: "localhost", referrer: "http://localhost/user/login"
nginx-1       | 2024/07/09 01:39:37 [notice] 28#28: *5 "^/runestone/static/JavaReview/(\w+)/(.*)$" does not match "/runestone/static/favicon.ico", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/favicon.ico HTTP/1.1", host: "localhost", referrer: "http://localhost/user/login"
nginx-1       | 2024/07/09 01:39:37 [notice] 28#28: *5 "^/runestone/static/csawesome/(\w+)/(.*)$" does not match "/runestone/static/favicon.ico", client: 172.20.0.1, server: runestonemobile.local, request: "GET /runestone/static/favicon.ico HTTP/1.1", host: "localhost", referrer: "http://localhost/user/login"
runestone-1   | [2024-07-09 01:39:37 +0000] [12] [DEBUG] GET /runestone/static/favicon.ico
nginx-1       | 172.20.0.1 - - [09/Jul/2024:01:39:37 +0000] "GET /runestone/static/favicon.ico HTTP/1.1" 200 15086 "http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
nginx-1       | 172.20.0.1 - [09/Jul/2024:01:39:37 +0000] Request: "GET /runestone/static/favicon.ico HTTP/1.1" Status: 200 Bytes: 15086 RequestTime: 0.003 Referrer: "http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
nginx-1       | 2024/07/09 01:39:38 [notice] 30#30: *7 "^/ads.txt" does not match "/ns/books/index", client: 172.20.0.1, server: runestonemobile.local, request: "GET /ns/books/index HTTP/1.1", host: "localhost", referrer: "http://localhost/user/login"
nginx-1       | 2024/07/09 01:39:38 [notice] 30#30: *7 "^/runestone/static/JavaReview/(\w+)/(.*)$" does not match "/ns/books/index", client: 172.20.0.1, server: runestonemobile.local, request: "GET /ns/books/index HTTP/1.1", host: "localhost", referrer: "http://localhost/user/login"
nginx-1       | 2024/07/09 01:39:38 [notice] 30#30: *7 "^/runestone/static/csawesome/(\w+)/(.*)$" does not match "/ns/books/index", client: 172.20.0.1, server: runestonemobile.local, request: "GET /ns/books/index HTTP/1.1", host: "localhost", referrer: "http://localhost/user/login"
book-1        | DEBUG - 2024-07-09 01:39:38,913 - get_session_object - In timezone middleware cookie is None
db-1          | 2024-07-09 01:39:38.951 UTC [80] ERROR:  column library.social_url does not exist at character 256
db-1          | 2024-07-09 01:39:38.951 UTC [80] STATEMENT:  SELECT library.id, library.title, library.subtitle, library.description, library.authors, library.shelf_section, library.basecourse, library.build_system, library.for_classes, library.is_visible, library.main_page, library.last_build, library.github_url, library.social_url
db-1          |         FROM library
db-1          |         WHERE library.is_visible = $1::varchar ORDER BY library.shelf_section, library.title
book-1        | ERROR - 2024-07-09 01:39:38,952 - generic_error_handler - UNHANDLED ERROR
book-1        | ERROR - 2024-07-09 01:39:38,952 - generic_error_handler - (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.UndefinedColumnError'>: column library.social_url does not exist
book-1        | [SQL: SELECT library.id, library.title, library.subtitle, library.description, library.authors, library.shelf_section, library.basecourse, library.build_system, library.for_classes, library.is_visible, library.main_page, library.last_build, library.github_url, library.social_url
book-1        | FROM library
book-1        | WHERE library.is_visible = %s ORDER BY library.shelf_section, library.title]
book-1        | [parameters: ('T',)]
book-1        | (Background on this error at: https://sqlalche.me/e/14/f405)
book-1        | DEBUG - 2024-07-09 01:39:38,961 - create_traceback - dl[-2:]=[{'name': '_handle_exception', 'local_vars': {'self': <sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_cursor object at 0x7f813e4ab7d0>, 'error': UndefinedColumnError('column library.social_url does not exist')}}, {'name': '_handle_exception', 'local_vars': {'self': <AdaptedConnection <asyncpg.connection.Connection object at 0x7f813e335620>>, 'error': UndefinedColumnError('column library.social_url does not exist'), 'exception_mapping': {<class 'asyncpg.exceptions.IntegrityConstraintViolationError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.IntegrityError'>, <class 'asyncpg.exceptions._base.PostgresError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.Error'>, <class 'asyncpg.exceptions.SyntaxOrAccessError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.ProgrammingError'>, <class 'asyncpg.exceptions._base.InterfaceError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.InterfaceError'>, <class 'asyncpg.exceptions.InvalidCachedStatementError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.InvalidCachedStatementError'>, <class 'asyncpg.exceptions.InternalServerError'>: <class 'sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.InternalServerError'>}, 'super_': <class 'asyncpg.exceptions.SyntaxOrAccessError'>, 'translated_error': ProgrammingError("<class 'asyncpg.exceptions.UndefinedColumnError'>: column library.social_url does not exist")}}]
db-1          | 2024-07-09 01:39:38.965 UTC [80] ERROR:  value too long for type character varying(512)
db-1          | 2024-07-09 01:39:38.965 UTC [80] STATEMENT:  INSERT INTO traceback (traceback, timestamp, err_message, path, query_string, post_body, hash, hostname) VALUES ($1::varchar, $2::timestamp, $3::varchar, $4::varchar, $5::varchar, $6::varchar, $7::varchar, $8::varchar) RETURNING traceback.id
book-1        | ERROR:    Exception in ASGI application
book-1        | Traceback (most recent call last):
nginx-1       | 172.20.0.1 - - [09/Jul/2024:01:39:38 +0000] "GET /ns/books/index HTTP/1.1" 500 32 "http://localhost/user/login" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 442, in _prepare_and_execute
book-1        |     self._rows = await prepared_stmt.fetch(*parameters)
book-1        |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/asyncpg/prepared_stmt.py", line 176, in fetch
book-1        |     data = await self.__bind_execute(args, 0, timeout)
book-1        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/asyncpg/prepared_stmt.py", line 241, in __bind_execute
book-1        |     data, status, _ = await self.__do_execute(
book-1        |                       ^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/asyncpg/prepared_stmt.py", line 230, in __do_execute
book-1        |     return await executor(protocol)
book-1        |            ^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "asyncpg/protocol/protocol.pyx", line 201, in bind_execute
book-1        | asyncpg.exceptions.StringDataRightTruncationError: value too long for type character varying(512)
book-1        |
book-1        | The above exception was the direct cause of the following exception:
book-1        |
nginx-1       | 172.20.0.1 - [09/Jul/2024:01:39:38 +0000] Request: "GET /ns/books/index HTTP/1.1" Status: 500 Bytes: 32 RequestTime: 0.064 Referrer: "http://localhost/user/login" Agent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
book-1        | Traceback (most recent call last):
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
book-1        |     self.dialect.do_execute(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
book-1        |     cursor.execute(statement, parameters)
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 479, in execute
book-1        |     self._adapt_connection.await_(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 68, in await_only
book-1        |     return current.driver.switch(awaitable)
book-1        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 121, in greenlet_spawn
book-1        |     value = await result
book-1        |             ^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 454, in _prepare_and_execute
book-1        |     self._handle_exception(error)
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 389, in _handle_exception
book-1        |     self._adapt_connection._handle_exception(error)
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 682, in _handle_exception
book-1        |     raise translated_error from error
book-1        | sqlalchemy.dialects.postgresql.asyncpg.AsyncAdapt_asyncpg_dbapi.Error: <class 'asyncpg.exceptions.StringDataRightTruncationError'>: value too long for type character varying(512)
book-1        |
book-1        | The above exception was the direct cause of the following exception:
book-1        |
book-1        | Traceback (most recent call last):
book-1        |   File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 372, in run_asgi
book-1        |     result = await app(self.scope, self.receive, self.send)
book-1        |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
book-1        |     return await self.app(scope, receive, send)
book-1        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 292, in __call__
book-1        |     await super().__call__(scope, receive, send)
book-1        |   File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
book-1        |     await self.middleware_stack(scope, receive, send)
book-1        |   File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 174, in __call__
book-1        |     response = await self.handler(request, exc)
book-1        |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/ext/asyncio/session.py", line 652, in go
book-1        |     await self.trans.__aexit__(type_, value, traceback)
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/ext/asyncio/session.py", line 716, in __aexit__
book-1        |     await greenlet_spawn(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 128, in greenlet_spawn
book-1        |     result = context.switch(value)
book-1        |              ^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/util.py", line 235, in __exit__
book-1        |     with util.safe_reraise():
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
book-1        |     compat.raise_(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
book-1        |     raise exception
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/util.py", line 233, in __exit__
book-1        |     self.commit()
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 832, in commit
book-1        |     self._prepare_impl()
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 811, in _prepare_impl
book-1        |     self.session.flush()
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 3449, in flush
book-1        |     self._flush(objects)
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 3588, in _flush
book-1        |     with util.safe_reraise():
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
book-1        |     compat.raise_(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
book-1        |     raise exception
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 3549, in _flush
book-1        |     flush_context.execute()
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py", line 456, in execute
book-1        |     rec.execute(self)
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/unitofwork.py", line 630, in execute
book-1        |     util.preloaded.orm_persistence.save_obj(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py", line 245, in save_obj
book-1        |     _emit_insert_statements(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/persistence.py", line 1238, in _emit_insert_statements
book-1        |     result = connection._execute_20(
book-1        |              ^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1710, in _execute_20
book-1        |     return meth(self, args_10style, kwargs_10style, execution_options)
book-1        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 334, in _execute_on_connection
book-1        |     return connection._execute_clauseelement(
book-1        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1577, in _execute_clauseelement
book-1        |     ret = self._execute_context(
book-1        |           ^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1953, in _execute_context
book-1        |     self._handle_dbapi_exception(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2134, in _handle_dbapi_exception
book-1        |     util.raise_(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
book-1        |     raise exception
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1910, in _execute_context
book-1        |     self.dialect.do_execute(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
book-1        |     cursor.execute(statement, parameters)
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 479, in execute
book-1        |     self._adapt_connection.await_(
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 68, in await_only
book-1        |     return current.driver.switch(awaitable)
book-1        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 121, in greenlet_spawn
book-1        |     value = await result
book-1        |             ^^^^^^^^^^^^
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 454, in _prepare_and_execute
book-1        |     self._handle_exception(error)
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 389, in _handle_exception
book-1        |     self._adapt_connection._handle_exception(error)
book-1        |   File "/usr/local/lib/python3.11/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 682, in _handle_exception
book-1        |     raise translated_error from error
book-1        | sqlalchemy.exc.DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error) <class 'asyncpg.exceptions.StringDataRightTruncationError'>: value too long for type character varying(512)
book-1        | [SQL: INSERT INTO traceback (traceback, timestamp, err_message, path, query_string, post_body, hash, hostname) VALUES (%s, %s, %s, %s, %s, %s, %s, %s) RETURNING traceback.id]
book-1        | [parameters: ('  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__\n    await self.app(scope, receive, _send)\n   ... (7512 characters truncated) ... sError\'>, \'translated_error\': ProgrammingError("<class \'asyncpg.exceptions.UndefinedColumnError\'>: column library.social_url does not exist")}}]', datetime.datetime(2024, 7, 9, 1, 39, 38, 961410), "(sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.UndefinedColumnError'>: column library.social_url does not exist ... (310 characters truncated) ... ry.is_visible = %s ORDER BY library.shelf_section, library.title]\n[parameters: ('T',)]\n(Background on this error at: https://sqlalche.me/e/14/f405)", '/books/index', '', None, 'f266cfe024125bfe85d86f89421d9b86', '942d51b93b48')]
book-1        | (Background on this error at: https://sqlalche.me/e/14/dbapi)
book-1        | INFO:     172.20.0.5:39964 - "GET /books/index HTTP/1.1" 500 Internal Server Error

# I then checked to see what was in the database:
david@david-IdeaPad:~$ psql --host=localhost --port=2345 --username=runestone runestone_dev
Password for user runestone:
psql (14.12 (Ubuntu 14.12-0ubuntu0.22.04.1), server 13.12 (Debian 13.12-1.pgdg120+1))
Type "help" for help.

runestone_dev=# \dt
runestone_dev=# \d library
                                          Table "public.library"
    Column     |            Type             | Collation | Nullable |               Default              
---------------+-----------------------------+-----------+----------+-------------------------------------
 id            | integer                     |           | not null | nextval('library_id_seq'::regclass)
 title         | character varying(512)      |           | not null |
 subtitle      | character varying(512)      |           |          |
 description   | text                        |           |          |
 authors       | text                        |           |          |
 shelf_section | character varying(512)      |           |          |
 basecourse    | character varying(512)      |           | not null |
 build_system  | character varying(20)       |           |          |
 for_classes   | character(1)                |           |          |
 is_visible    | character(1)                |           |          |
 main_page     | character varying(512)      |           |          |
 last_build    | timestamp without time zone |           |          |
 github_url    | character varying(255)      |           |          |
Indexes:
    "library_pkey" PRIMARY KEY, btree (id)
    "library_basecourse_key" UNIQUE CONSTRAINT, btree (basecourse)
Foreign-key constraints:
    "library_basecourse_fkey" FOREIGN KEY (basecourse) REFERENCES courses(course_name)
Referenced by:
    TABLE "book_author" CONSTRAINT "book_author_book_fkey" FOREIGN KEY (book) REFERENCES library(basecourse)

# And here's the code in components/rsptx/db/models.py

class Library(Base, IdMixin):
    __tablename__ = "library"
    title = Column(String(512), nullable=False)
    subtitle = Column(String(512))
    description = Column(Text)
    authors = Column(Text)
    shelf_section = Column(String(512))
    basecourse = Column(
        String(512), ForeignKey("courses.course_name"), nullable=False, unique=True
    )    
    build_system = Column(String(20))
    for_classes = Column(Web2PyBoolean)
    is_visible = Column(Web2PyBoolean, default="T")
    github_url = Column(String(512))
    main_page = Column(String(512), default="index.html")
    last_build = Column(DateTime)
    github_url = Column(String(255))
    social_url = Column(String(255))  # link to group for instructors

Rob Beezer

unread,
Jul 8, 2024, 11:14:22 PM7/8/24
to pretext...@googlegroups.com, br...@runestone.academy
Dear David,

I'm not sure pretext-support is the best place for this.

Rob

J David Eisenberg

unread,
Jul 8, 2024, 11:34:44 PM7/8/24
to pretext...@googlegroups.com
Ah OK should I delete the message and go into the Zoom meeting tomorrow to try to figure this out?

--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/MTAwMDAzMS5iZWV6ZXI.1720494859%40quikprotect.

Sean Fitzpatrick

unread,
Jul 8, 2024, 11:42:09 PM7/8/24
to pretext...@googlegroups.com

There's a Discord for Runestone that might work better. I had this same problem and was able to upgrade the database, but I'm not near a computer right now.

I think Brad said the newest rsmanage can automatically handle database changes?


Reply all
Reply to author
Forward
0 new messages