Skip to content

could not assemble any primary key columns for mapped table 'sqlite_sequence' #116

Description

@ba1dr

Ubuntu 15.10, Python 3.5, Sandman 0.9.8

Trying to open my db.sqlite3 file (created with django, no magic, just some tables with users):

sandmanctl sqlite:////opt/projects/somepath/db.sqlite3

And receive an error:

/usr/local/lib/python3.5/dist-packages/flask_sqlalchemy/__init__.py:800: UserWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True to suppress this warning.
  warnings.warn('SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True to suppress this warning.')
/usr/local/lib/python3.5/dist-packages/click/core.py:858: Warning: Invoked legacy parameter callback "<function print_version at 0x7f3f2458dd90>".  The new signature for such callbacks starting with click 2.0 is (ctx, param, value).
  value, args = param.handle_parse_result(ctx, opts, args)
Traceback (most recent call last):
  File "/usr/local/bin/sandmanctl", line 9, in <module>
    load_entry_point('sandman==0.9.8', 'console_scripts', 'sandmanctl')()
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 700, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 680, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 873, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 508, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/sandman/sandmanctl.py", line 43, in run
    activate(name='sandmanctl')
  File "/usr/local/lib/python3.5/dist-packages/sandman/model/utils.py", line 179, in activate
    generate_endpoint_classes(db, generate_pks)
  File "/usr/local/lib/python3.5/dist-packages/sandman/model/utils.py", line 42, in generate_endpoint_classes
    {'__tablename__': name})
  File "/usr/local/lib/python3.5/dist-packages/flask_sqlalchemy/__init__.py", line 609, in __init__
    DeclarativeMeta.__init__(self, name, bases, d)
  File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/ext/declarative/api.py", line 55, in __init__
    _as_declarative(cls, classname, cls.__dict__)
  File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/ext/declarative/base.py", line 88, in _as_declarative
    _MapperConfig.setup_mapping(cls, classname, dict_)
  File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/ext/declarative/base.py", line 103, in setup_mapping
    cfg_cls(cls_, classname, dict_)
  File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/ext/declarative/base.py", line 135, in __init__
    self._early_mapping()
  File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/ext/declarative/base.py", line 138, in _early_mapping
    self.map()
  File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/ext/declarative/base.py", line 529, in map
    **self.mapper_args
  File "<string>", line 2, in mapper
  File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/orm/mapper.py", line 629, in __init__
    self._configure_pks()
  File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/orm/mapper.py", line 1223, in _configure_pks
    (self, self.mapped_table.description))
sqlalchemy.exc.ArgumentError: Mapper Mapper|sqlite_sequence|sqlite_sequence could not assemble any primary key columns for mapped table 'sqlite_sequence'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions