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

Error in sqlite table column reading by chanjo report #24

Open
kevjp opened this issue Mar 9, 2016 · 0 comments
Open

Error in sqlite table column reading by chanjo report #24

kevjp opened this issue Mar 9, 2016 · 0 comments

Comments

@kevjp
Copy link

kevjp commented Mar 9, 2016

Following the upgrade suggested in #22 I still am running into problems when I run the command:

chanjo report --render pdf --samples "sample2" > ./out.pdf

This time the error report is:

[2016-03-09 17:17:11,092] INFO    : chanjo.cli.root          : version 3.4.1
--------------------------------------------------------------------------------
DEBUG in api [/usr/local/lib/python2.7/dist-packages/chanjo/store/api.py:45]:
set up new session
--------------------------------------------------------------------------------
[2016-03-09 17:17:11,450] ERROR   : chanjo_report.server.blueprints.report.views: (pysqlite2.dbapi2.OperationalError) no such column: sample.source [SQL: u'SELECT sample.id AS sample_id, sample.group_id AS sample_group_id, sample.source AS sample_source, sample.created_at AS sample_created_at \nFROM sample \nWHERE sample.group_id = ?'] [parameters: (u'coverage',)]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/chanjo_report/server/blueprints/report/views.py", line 45, in map_samples
    samples = {sample_obj.id: sample_obj for sample_obj in query}
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2736, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2751, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 200, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (pysqlite2.dbapi2.OperationalError) no such column: sample.source [SQL: u'SELECT sample.id AS sample_id, sample.group_id AS sample_group_id, sample.source AS sample_source, sample.created_at AS sample_created_at \nFROM sample \nWHERE sample.group_id = ?'] [parameters: (u'coverage',)]
Traceback (most recent call last):
  File "/usr/local/bin/chanjo", line 11, in <module>
    sys.exit(root_command())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/chanjo_report/cli/core.py", line 46, in report
    click.echo(render_method(api, options=context.obj))
  File "/usr/local/lib/python2.7/dist-packages/chanjo_report/interfaces/pdf/core.py", line 26, in render_pdf
    return HTML(url).write_pdf()
  File "/usr/local/lib/python2.7/dist-packages/flask_weasyprint/__init__.py", line 182, in HTML
    return _wrapper(weasyprint.HTML, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask_weasyprint/__init__.py", line 165, in _wrapper
    return class_(guess, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/weasyprint/__init__.py", line 82, in __init__
    with result as (source_type, source, base_url, protocol_encoding):
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/local/lib/python2.7/dist-packages/weasyprint/__init__.py", line 290, in _select_source
    with result as result:
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/local/lib/python2.7/dist-packages/weasyprint/__init__.py", line 298, in _select_source
    with fetch(url_fetcher, url) as result:
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/local/lib/python2.7/dist-packages/weasyprint/urls.py", line 315, in fetch
    raise URLFetchingError('%s: %s' % (name, value) if value else name)
weasyprint.urls.URLFetchingError: ValueError: Flask-WeasyPrint got HTTP status 500 INTERNAL SERVER ERROR for http://localhost/group/coverage

I am just trying this out on the demo data from chanjo to begin. Many thanks @robinandeer for your help with the previous issue.

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