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

Unable to create a database locally #1

Open
mgerst opened this issue Apr 6, 2017 · 1 comment
Open

Unable to create a database locally #1

mgerst opened this issue Apr 6, 2017 · 1 comment

Comments

@mgerst
Copy link

mgerst commented Apr 6, 2017

Running any of the db_* scripts causes the following error:

Traceback (most recent call last):
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: user

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "./db_init.py", line 2, in <module>
    from vuln_corp import db, models
  File "/home/keane/dev/vuln-corp/vuln_corp/__init__.py", line 8, in <module>
    from vuln_corp import views
  File "/home/keane/dev/vuln-corp/vuln_corp/views.py", line 10, in <module>
    from vuln_corp.choices import ISSUE_ASSIGNEES
  File "/home/keane/dev/vuln-corp/vuln_corp/choices.py", line 9, in <module>
    ISSUE_ASSIGNEES = [(g.username, g.username) for g in User.query.filter(User.group == 1).all()]
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 2613, in all
    return list(self)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 2761, in __iter__
    return self._execute_and_instances(context)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/orm/query.py", line 2776, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 185, in reraise
    raise value.with_traceback(tb)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/home/keane/dev/vuln-corp/env/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: user [SQL: 'SELECT user.id AS user_id, user.username AS user_username, user.firstname AS user_firstname, user.lastname AS user_lastname, user.picture AS user_picture, user.bio AS user_bio, user.password AS user_password, user."group" AS user_group, user.email AS user_email, user.creation_date AS user_creation_date \nFROM us
@mgerst
Copy link
Author

mgerst commented Apr 6, 2017

To quote @keaneokelley

How did this ever work?

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

1 participant