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

Snap installed from store cannot write sqlite database #8

Open
adborden opened this issue Mar 10, 2019 · 1 comment
Open

Snap installed from store cannot write sqlite database #8

adborden opened this issue Mar 10, 2019 · 1 comment

Comments

@adborden
Copy link
Member

Running the snap from the snap store fails to write/create the database.

  1. Install the snap.
$ snap install pathagar --edge --devmode
pathagar (edge) 0+git.53d8325 from Aaron Borden (adborden) installed
  1. Run the snap
$ snap run pathagar.start
Traceback (most recent call last):
  File "/snap/pathagar/2/app/manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 83, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/migrations/loader.py", line 52, in __init__
    self.build_graph()
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/migrations/loader.py", line 210, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations
    self.ensure_schema()
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 52, in ensure_schema
    if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/backends/base/base.py", line 254, in cursor
    return self._cursor()
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/backends/base/base.py", line 229, in _cursor
    self.ensure_connection()
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection
    self.connect()
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/backends/base/base.py", line 189, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/snap/pathagar/2/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 198, in get_new_connection
    conn = Database.connect(**conn_params)
django.db.utils.OperationalError: unable to open database file
@adborden
Copy link
Member Author

https://askubuntu.com/questions/762354/where-can-ubuntu-snaps-write-data

Looks like we want to write data to $SNAP_DATA.

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