Background: I am using Heroku to deploy a website using postgresql and gunicorn. It keeps throwing me a null error, and I'm not sure how to proceed. The database is simply a primary key ID, the username, password(hashed) and the users cash amount. Please let me know if there are additional details needed.
2022-01-07T18:37:46.209593+00:00 app[web.1]: DEBUG: [33mINSERT INTO users(username, hash) VALUES ('bells', 'pbkdf2:sha256:260000$3HbHmQOV4bCNLi5u$c8fe4a97274677b4465789748c649a95d900e7924916f1b5af95b4d9e111d5a8')[0m
2022-01-07T18:37:46.212392+00:00 app[web.1]: ERROR: Exception on /register [POST]
2022-01-07T18:37:46.212393+00:00 app[web.1]: [33mTraceback (most recent call last):[0m
2022-01-07T18:37:46.212394+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
2022-01-07T18:37:46.212395+00:00 app[web.1]: response = self.full_dispatch_request()
2022-01-07T18:37:46.212396+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
2022-01-07T18:37:46.212396+00:00 app[web.1]: rv = self.handle_user_exception(e)
2022-01-07T18:37:46.212396+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
2022-01-07T18:37:46.212397+00:00 app[web.1]: rv = self.dispatch_request()
2022-01-07T18:37:46.212397+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
2022-01-07T18:37:46.212397+00:00 app[web.1]: return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
2022-01-07T18:37:46.212398+00:00 app[web.1]: File "/app/app.py", line 282, in register
2022-01-07T18:37:46.212398+00:00 app[web.1]: db.execute("INSERT INTO users(username, hash) VALUES (?, ?)", username, password)
2022-01-07T18:37:46.212399+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/cs50/sql.py", line 27, in decorator
2022-01-07T18:37:46.212400+00:00 app[web.1]: return f(*args, **kwargs)
2022-01-07T18:37:46.212400+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/cs50/sql.py", line 374, in execute
2022-01-07T18:37:46.212401+00:00 app[web.1]: raise e
2022-01-07T18:37:46.212401+00:00 app[web.1]: [33mValueError: null value in column "id" of relation "users" violates not-null constraint
2022-01-07T18:37:46.212402+00:00 app[web.1]: DETAIL: Failing row contains (null, bells, pbkdf2:sha256:260000$3HbHmQOV4bCNLi5u$c8fe4a97274677b4465789748c..., 10000.00).[0m
2022-01-07T18:37:46.213381+00:00 app[web.1]: 10.1.17.237 - - [07/Jan/2022:18:37:46 +0000] "POST /register HTTP/1.1" 500 2556 "https://financestocks.herokuapp.com/register" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"
Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...
2022-01-07T18:37:46.212399+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/cs50/sql.py", line 27, in decorator
2022-01-07T18:37:46.212400+00:00 app[web.1]: return f(*args, **kwargs)
2022-01-07T18:37:46.212400+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/cs50/sql.py", line 374, in execute
2022-01-07T18:37:46.212401+00:00 app[web.1]: raise e
2022-01-07T18:37:46.212401+00:00 app[web.1]: [33mValueError: null value in column "id" of relation "users" violates not-null constraint
2022-01-07T18:37:46.212402+00:00 app[web.1]: DETAIL: Failing row contains (null, bells, pbkdf2:sha256:260000$3HbHmQOV4bCNLi5u$c8fe4a97274677b4465789748c..., 10000.00).[0m