nsfc query -s approval_year 2014 -s subject_code "%H08%" -o /cluster/home/zfli/H08.2014.xlsx -F xlsx
[2021-04-14 00:24:58 STATS main INFO MainThread:72] input arguments: {'search': (('approval_year', '2014'), ('subject_code', '%H08%')), 'outfile': '/cluster/home/zfli/H08.2014.xlsx', 'format': 'xlsx', 'dbfile': '/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/nsfc/data/proejct.db', 'keys': False, 'count': False, 'limit': None, 'log_level': 'info'}
Traceback (most recent call last):
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1706, in _execute_context
cursor, statement, parameters, context
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 692, in do_execute
cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/cluster/home/zfli/anaconda2/envs/NSFC/bin/nsfc", line 8, in <module>
sys.exit(main())
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/nsfc/bin/main.py", line 27, in main
cli()
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/nsfc/bin/query.py", line 121, in main
elif not query.count():
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3064, in count
return self._from_self(col).enable_eagerloads(False).scalar()
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2805, in scalar
ret = self.one()
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2782, in one
return self._iter().one()
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2823, in _iter
execution_options={"_sa_orm_load_options": self.load_options},
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 1670, in execute
result = conn._execute_20(statement, params or {}, execution_options)
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1520, in _execute_20
return meth(self, args_10style, kwargs_10style, execution_options)
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 314, in _execute_on_connection
self, multiparams, params, execution_options
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1399, in _execute_clauseelement
cache_hit=cache_hit,
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1749, in _execute_context
e, statement, parameters, cursor, context
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1930, in _handle_dbapi_exception
sqlalchemy_exception, with_traceback=exc_info[2], from_=e
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
raise exception
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1706, in _execute_context
cursor, statement, parameters, context
File "/cluster/home/zfli/anaconda2/envs/NSFC/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 692, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) database disk image is malformed
[SQL: SELECT count(*) AS count_1
FROM (SELECT project.project_id AS project_project_id, project.title AS project_title, project.project_type AS project_project_type, project.project_type_code AS project_project_type_code, project.approval_year AS project_approval_year, project.person AS project_person, project.money AS project_money, project.institution AS project_institution, project.start_time AS project_start_time, project.end_time AS project_end_time, project.subject AS project_subject, project.subject_class_list AS project_subject_class_list, project.subject_code_list AS project_subject_code_list, project.subject_code AS project_subject_code, project.finished AS project_finished, project.keyword AS project_keyword, project.keyword_en AS project_keyword_en, project.abstract AS project_abstract, project.abstract_en AS project_abstract_en, project.abstract_conc AS project_abstract_conc, project.result_stat AS project_result_stat
FROM project
WHERE project.approval_year = ? AND project.subject_code LIKE ?) AS anon_1]
[parameters: ('2014', '%H08%')]
(Background on this error at: http://sqlalche.me/e/14/4xp6)