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

PDFminer incompatible with django #105

Closed
ananth-srv opened this issue Dec 19, 2017 · 2 comments · Fixed by #320
Closed

PDFminer incompatible with django #105

ananth-srv opened this issue Dec 19, 2017 · 2 comments · Fixed by #320

Comments

@ananth-srv
Copy link

When I have django and Pdf miner installed, the application fails. Could you please fix this issue?

from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
File "/usr/local/lib/python3.5/dist-packages/pdfminer/pdfinterp.py", line 5, in
from .cmapdb import CMapDB
File "/usr/local/lib/python3.5/dist-packages/pdfminer/cmapdb.py", line 24, in
from .psparser import PSStackParser
File "/usr/local/lib/python3.5/dist-packages/pdfminer/psparser.py", line 24, in
STRICT = getattr(settings, 'PDF_MINER_IS_STRICT', True)
File "/home/vijay/.local/lib/python3.5/site-packages/django/conf/init.py", line 53, in getattr
self._setup(name)
File "/home/vijay/.local/lib/python3.5/site-packages/django/conf/init.py", line 39, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting PDF_MINER_IS_STRICT, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

@tanmais
Copy link

tanmais commented Dec 30, 2017

I had the same problem. You need to create a new virtual environment for your project and install pdfplumber into it. worked for me ...

@pietermarsman
Copy link
Member

I'm not seeing why pdfminer should depend on Django.

I suggest we deprecate the usage of Django and drop the support in a later release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants