Issue #385 new

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

Roger Haase
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
dule!
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\pysupport.py", line 43, in load_package_modules
    imp.load_module(module_complete, *info)
  File "c:\bitbucket\m2-x7\MoinMoin\converter\pdf_in.py", 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\moin-script.py", line 9, in <module>
    load_entry_point('moin==2.0.0a0', 'console_scripts', 'moin')()
  File "c:\bitbucket\m2-x7\MoinMoin\script\__init__.py", line 16, in main
    from MoinMoin.app import create_app
  File "c:\bitbucket\m2-x7\MoinMoin\app.py", line 168, in <module>
    from MoinMoin.storage.middleware import protecting, indexing, routing
  File "c:\bitbucket\m2-x7\MoinMoin\storage\middleware\indexing.py", line 172, in <module>
    from MoinMoin.converter import default_registry
  File "c:\bitbucket\m2-x7\MoinMoin\converter\__init__.py", line 56, in <module>
    load_package_modules(__name__, __path__)
  File "c:\bitbucket\m2-x7\MoinMoin\util\pysupport.py", 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\__init__.py", line 1182, in exception
    self.error(msg, *args, **kwargs)
  File "C:\Python27\Lib\logging\__init__.py", line 1175, in error
    self._log(ERROR, msg, args, **kwargs)
  File "C:\Python27\Lib\logging\__init__.py", line 1268, in _log
    self.handle(record)
  File "C:\Python27\Lib\logging\__init__.py", line 1278, in handle
    self.callHandlers(record)
  File "C:\Python27\Lib\logging\__init__.py", line 1318, in callHandlers
    hdlr.handle(record)
  File "C:\Python27\Lib\logging\__init__.py", line 749, in handle
    self.emit(record)
  File "c:\bitbucket\m2-x7\MoinMoin\log.py", line 205, in emit
    if not app.cfg.email_tracebacks:
  File "C:\Bitbucket\venv-m2-x7-python.exe\lib\site-packages\werkzeug\local.py", line 338, in __getattr__
    return getattr(self._get_current_object(), name)
  File "C:\Bitbucket\venv-m2-x7-python.exe\lib\site-packages\werkzeug\local.py", line 297, in _get_current_object
    return self.__local()
  File "C:\Bitbucket\venv-m2-x7-python.exe\lib\site-packages\flask\globals.py", 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