wpoa / open-access-media-importer

A tool for harvesting media files from Open Access articles for upload into Wikimedia Commons
http://commons.wikimedia.org/wiki/User:Open_Access_Media_Importer_Bot
23 stars 8 forks source link

sqlalchemy.exc.OperationalError #123

Closed Daniel-Mietchen closed 10 years ago

Daniel-Mietchen commented 10 years ago

danielmietchen@files:~/open-access-media-importer$ echo 3922590 | ./oa-get download-metadata pmc_pmcid Input PMCIDs, delimited by whitespace: Removing “/home/danielmietchen/.cache/open-access-media-importer/metadata/raw/pmc_pmcid/efetch.fcgi0” … done. Downloading “http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pmc&id=3922590”, saving into directory “/home/danielmietchen/.cache/open-access-media-importer/metadata/raw/pmc_pmcid” … 100% |#########################################################################################################################################################################################################| danielmietchen@files:~/open-access-media-importer$ ./oa-cache find-media pmc_pmcid Traceback (most recent call last): File "./oa-cache", line 207, in skip = [article.name for article in Article.query.all()] File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2115, in all return list(self) File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2227, in iter return self._execute_and_instances(context) File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute params) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement compiled_sql, distilled_params File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context context) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context context) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (OperationalError) no such table: model_article u'SELECT model_article.title AS model_article_title, model_article.contrib_authors AS model_article_contrib_authors, model_article.name AS model_article_name, model_article.doi AS model_article_doi, model_article.abstract AS model_article_abstract, model_article.year AS model_article_year, model_article.month AS model_article_month, model_article.day AS model_article_day, model_article.url AS model_article_url, model_article.license_url AS model_article_license_url, model_article.license_text AS model_article_license_text, model_article.copyright_statement AS model_article_copyright_statement, model_article.copyright_holder AS model_article_copyright_holder, model_article.journal_title AS model_article_journal_title \nFROM model_article' () danielmietchen@files:~/open-access-media-importer$ ./oa-cache clear-database

oa-cache – Open Access Media Importer local operations

usage: oa-cache browse-database [source] | oa-cache clear-media [source] | oa-cache clear-database [source] | oa-cache convert-media [source] | oa-cache find-media [source] | oa-cache forget-converted [source] | oa-cache forget-downloaded [source] | oa-cache forget-uploaded [source] | oa-cache print-database-path [source] oa-cache stats [source]

danielmietchen@files:~/open-access-media-importer$ ./oa-cache clear-database pmc_pmcid Removing “/home/danielmietchen/.local/share/open-access-media-importer/pmc_pmcid.sqlite” … [Errno 2] Datei oder Verzeichnis nicht gefunden: '/home/danielmietchen/.local/share/open-access-media-importer/pmc_pmcid.sqlite' danielmietchen@files:~/open-access-media-importer$ apt-cache show python-elixir Package: python-elixir Source: elixir Version: 0.7.1-1 Installed-Size: 308 ... danielmietchen@files:~/open-access-media-importer$ apt-cache show python-sqlalchemy Package: python-sqlalchemy Source: sqlalchemy Version: 0.8.4-1 Installed-Size: 3241

Daniel-Mietchen commented 10 years ago

Manually fixed as per https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=739476&archived=False&mbox=no#16 .