Issue #385 new

RunTimeError: working outside of application context (pdfminer == 20131113)

created an issue

With a fresh clone, pdfminer 20131113 is installed, resulting in:

(venv-m2-x7-python.exe) C:\Bitbucket\m2-x7>moin
2013-11-16 08:59:14,075 INFO MoinMoin.log:157 using logging configuration read from built-in fallback in MoinMoin.log mo
2013-11-16 08:59:14,075 INFO MoinMoin.log:162 Running MoinMoin 2.0.0a0 code from c:\bitbucket\m2-x7\MoinMoin
2013-11-16 08:59:22,355 ERROR MoinMoin.converter:47 Failed to import MoinMoin.converter package module pdf_in: cannot im
port name PDFDocument
Traceback (most recent call last):
  File "c:\bitbucket\m2-x7\MoinMoin\util\", line 43, in load_package_modules
    imp.load_module(module_complete, *info)
  File "c:\bitbucket\m2-x7\MoinMoin\converter\", line 14, in <module>
    from pdfminer.pdfparser import PDFDocument, PDFParser
ImportError: cannot import name PDFDocument
Traceback (most recent call last):
  File "C:\Bitbucket\venv-m2-x7-python.exe\Scripts\", line 9, in <module>
    load_entry_point('moin==2.0.0a0', 'console_scripts', 'moin')()
  File "c:\bitbucket\m2-x7\MoinMoin\script\", line 16, in main
    from import create_app
  File "c:\bitbucket\m2-x7\MoinMoin\", line 168, in <module>
    from import protecting, indexing, routing
  File "c:\bitbucket\m2-x7\MoinMoin\storage\middleware\", line 172, in <module>
    from MoinMoin.converter import default_registry
  File "c:\bitbucket\m2-x7\MoinMoin\converter\", line 56, in <module>
    load_package_modules(__name__, __path__)
  File "c:\bitbucket\m2-x7\MoinMoin\util\", line 47, in load_package_modules
    logger.exception("Failed to import {0} package module {1}: {2}".format(package_name, module, e))
  File "C:\Python27\Lib\logging\", line 1182, in exception
    self.error(msg, *args, **kwargs)
  File "C:\Python27\Lib\logging\", line 1175, in error
    self._log(ERROR, msg, args, **kwargs)
  File "C:\Python27\Lib\logging\", line 1268, in _log
  File "C:\Python27\Lib\logging\", line 1278, in handle
  File "C:\Python27\Lib\logging\", line 1318, in callHandlers
  File "C:\Python27\Lib\logging\", line 749, in handle
  File "c:\bitbucket\m2-x7\MoinMoin\", line 205, in emit
    if not app.cfg.email_tracebacks:
  File "C:\Bitbucket\venv-m2-x7-python.exe\lib\site-packages\werkzeug\", line 338, in __getattr__
    return getattr(self._get_current_object(), name)
  File "C:\Bitbucket\venv-m2-x7-python.exe\lib\site-packages\werkzeug\", line 297, in _get_current_object
    return self.__local()
  File "C:\Bitbucket\venv-m2-x7-python.exe\lib\site-packages\flask\", line 34, in _find_app
    raise RuntimeError('working outside of application context')
RuntimeError: working outside of application context

Workaround is:

pip uninstall pdfminer
pip install pdfminer==20110515

Comments (2)

  1. Log in to comment