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

windows install threw an unhandled error #26

Closed
BasHamer opened this issue Nov 29, 2018 · 2 comments
Closed

windows install threw an unhandled error #26

BasHamer opened this issue Nov 29, 2018 · 2 comments

Comments

@BasHamer
Copy link

running as administrator on Windows Version 10.0.17763 Build 17763 after installing python-3.7.1-amd64

PS C:\excalibur> pip install excalibur-py
PS C:\excalibur> excalibur initdb
Error ModuleNotFoundError: No module named 'chardet'

full output below

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> *cd C:\excalibur*
PS C:\excalibur> pip install excalibur-py
Collecting excalibur-py
Downloading https://files.pythonhosted.org/packages/9e/fe/6d60ad37075c89136e614cefa494aff4701e97e5121193c09a70d3c827b0/excalibur_py-0.4.0-py2.py3-none-any.whl (1.5MB)
100% |████████████████████████████████| 1.5MB 1.9MB/s
Collecting camelot-py[cv]>=0.2.3 (from excalibur-py)
Downloading https://files.pythonhosted.org/packages/65/e3/75842357e53f675d60b093c182d254c37db5b1d6144d12703af0a433f7f5/camelot-py-0.4.0.tar.gz
Collecting configparser<3.6.0,>=3.5.0 (from excalibur-py)
Downloading https://files.pythonhosted.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz
Collecting Flask>=1.0.2 (from excalibur-py)
Downloading https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl (91kB)
100% |████████████████████████████████| 92kB 3.8MB/s
Collecting SQLAlchemy>=1.2.12 (from excalibur-py)
Downloading https://files.pythonhosted.org/packages/e2/0a/05b7d13618ad41c108a6c2b886af83bf9bb7e35f8951227abb18b1330745/SQLAlchemy-1.2.14.tar.gz (5.7MB)
100% |████████████████████████████████| 5.7MB 1.7MB/s
Collecting Click>=7.0 (from excalibur-py)
Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
100% |████████████████████████████████| 81kB 4.1MB/s
Collecting celery>=4.1.1 (from excalibur-py)
Downloading https://files.pythonhosted.org/packages/e8/58/2a0b1067ab2c12131b5c089dfc579467c76402475c5231095e36a43b749c/celery-4.2.1-py2.py3-none-any.whl (401kB)
100% |████████████████████████████████| 409kB 1.1MB/s
Collecting numpy>=1.13.3 (from camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/00/0e/5a8c34adb97fc1cd6636d78050e575945e874c8516d501421d5a0f377a6c/numpy-1.15.4-cp37-none-win_amd64.whl (13.5MB)
100% |████████████████████████████████| 13.5MB 1.3MB/s
Collecting openpyxl>=2.5.8 (from camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/08/8a/509eb6f58672288da9a5884e1cc7e90819bc8dbef501161c4b40a6a4e46b/openpyxl-2.5.12.tar.gz (173kB)
100% |████████████████████████████████| 174kB 1.8MB/s
Collecting pandas>=0.23.4 (from camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/58/a8/03e5fe0edbc522e46cb27df2abfb4266814129253d8462f38bc704a76a2a/pandas-0.23.4-cp37-cp37m-win_amd64.whl (7.9MB)
100% |████████████████████████████████| 7.9MB 1.6MB/s
Collecting pdfminer.six>=20170720 (from camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/8a/fd/6e8746e6965d1a7ea8e97253e3d79e625da5547e8f376f88de5d024bacb9/pdfminer.six-20181108-py2.py3-none-any.whl (5.6MB)
100% |████████████████████████████████| 5.6MB 1.7MB/s
Collecting PyPDF2>=1.26.0 (from camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/b4/01/68fcc0d43daf4c6bdbc6b33cc3f77bda531c86b174cac56ef0ffdb96faab/PyPDF2-1.26.0.tar.gz (77kB)
100% |████████████████████████████████| 81kB 4.8MB/s
Collecting opencv-python>=3.4.2.17 (from camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/65/b0/1b098827a7a879546363e5c976418850e6d9bebf7662f32ddefd30ae9c2c/opencv_python-3.4.4.19-cp37-cp37m-win_amd64.whl (38.3MB)
100% |████████████████████████████████| 38.3MB 302kB/s
Collecting Jinja2>=2.10 (from Flask>=1.0.2->excalibur-py)
Downloading https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl (126kB)
100% |████████████████████████████████| 133kB 2.8MB/s
Collecting Werkzeug>=0.14 (from Flask>=1.0.2->excalibur-py)
Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
100% |████████████████████████████████| 327kB 1.8MB/s
Collecting itsdangerous>=0.24 (from Flask>=1.0.2->excalibur-py)
Downloading https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting billiard<3.6.0,>=3.5.0.2 (from celery>=4.1.1->excalibur-py)
Downloading https://files.pythonhosted.org/packages/87/ac/9b3cc065557ad5769d0626fd5dba0ad1cb40e3a72fe6acd3d081b4ad864e/billiard-3.5.0.4.tar.gz (150kB)
100% |████████████████████████████████| 153kB 2.2MB/s
Collecting kombu<5.0,>=4.2.0 (from celery>=4.1.1->excalibur-py)
Downloading https://files.pythonhosted.org/packages/97/61/65838c7da048e56d549e358ac19c0979c892e17dc6186610c49531d35b70/kombu-4.2.1-py2.py3-none-any.whl (177kB)
100% |████████████████████████████████| 184kB 2.2MB/s
Collecting pytz>dev (from celery>=4.1.1->excalibur-py)
Downloading https://files.pythonhosted.org/packages/f8/0e/2365ddc010afb3d79147f1dd544e5ee24bf4ece58ab99b16fbb465ce6dc0/pytz-2018.7-py2.py3-none-any.whl (506kB)
100% |████████████████████████████████| 512kB 1.4MB/s
Collecting jdcal (from openpyxl>=2.5.8->camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/a0/38/dcf83532480f25284f3ef13f8ed63e03c58a65c9d3ba2a6a894ed9497207/jdcal-1.4-py2.py3-none-any.whl
Collecting et_xmlfile (from openpyxl>=2.5.8->camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/22/28/a99c42aea746e18382ad9fb36f64c1c1f04216f41797f2f0fa567da11388/et_xmlfile-1.0.1.tar.gz
Collecting python-dateutil>=2.5.0 (from pandas>=0.23.4->camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/74/68/d87d9b36af36f44254a8d512cbfc48369103a3b9e474be9bdfe536abfc45/python_dateutil-2.7.5-py2.py3-none-any.whl (225kB)
100% |████████████████████████████████| 235kB 2.2MB/s
Collecting sortedcontainers (from pdfminer.six>=20170720->camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/13/f3/cf85f7c3a2dbd1a515d51e1f1676d971abe41bba6f4ab5443240d9a78e5b/sortedcontainers-2.1.0-py2.py3-none-any.whl
Collecting pycryptodome (from pdfminer.six>=20170720->camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/fc/99/ed80fd36eebe26914bd8aae4ac70fcef2d4ad94453981c171fe791629146/pycryptodome-3.7.2-cp37-cp37m-win_amd64.whl (8.0MB)
100% |████████████████████████████████| 8.0MB 1.5MB/s
Collecting six (from pdfminer.six>=20170720->camelot-py[cv]>=0.2.3->excalibur-py)
Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->Flask>=1.0.2->excalibur-py)
Downloading https://files.pythonhosted.org/packages/44/6e/41ac9266e3db762dfd9089f6b0d2298c84160f54ef2a7257c17b0e7ec2ec/MarkupSafe-1.1.0-cp37-cp37m-win_amd64.whl
Collecting amqp<3.0,>=2.1.4 (from kombu<5.0,>=4.2.0->celery>=4.1.1->excalibur-py)
Downloading https://files.pythonhosted.org/packages/7f/cf/12d4611fc67babd4ae250c9e8249c5650ae1933395488e9e7e3562b4ff24/amqp-2.3.2-py2.py3-none-any.whl (48kB)
100% |████████████████████████████████| 51kB 2.8MB/s
Collecting vine>=1.1.3 (from amqp<3.0,>=2.1.4->kombu<5.0,>=4.2.0->celery>=4.1.1->excalibur-py)
Downloading https://files.pythonhosted.org/packages/10/50/5b1ebe42843c19f35edb15022ecae339fbec6db5b241a7a13c924dabf2a3/vine-1.1.4-py2.py3-none-any.whl
Installing collected packages: Click, numpy, jdcal, et-xmlfile, openpyxl, six, python-dateutil, pytz, pandas, sortedcontainers, pycryptodome, pdfminer.six, PyPDF2, opencv-python, camelot-py, configparser, MarkupSafe, Jinja2, Werkzeug, itsdangerous, Flask, SQLAlchemy, billiard, vine, amqp, kombu, celery, excalibur-py
Running setup.py install for et-xmlfile ... done
Running setup.py install for openpyxl ... done
Running setup.py install for PyPDF2 ... done
Running setup.py install for camelot-py ... done
Running setup.py install for configparser ... done
The script flask.exe is installed in 'c:\users\user1\appdata\local\programs\python\python37\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Running setup.py install for SQLAlchemy ... done
Running setup.py install for billiard ... done
The script celery.exe is installed in 'c:\users\user1\appdata\local\programs\python\python37\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The script excalibur.exe is installed in 'c:\users\user1\appdata\local\programs\python\python37\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Click-7.0 Flask-1.0.2 Jinja2-2.10 MarkupSafe-1.1.0 PyPDF2-1.26.0 SQLAlchemy-1.2.14 Werkzeug-0.14.1 amqp-2.3.2 billiard-3.5.0.4 camelot-py-0.4.0 celery-4.2.1 configparser-3.5.0 et-xmlfile-1.0.1 excalibur-py-0.4.0 itsdangerous-1.1.0 jdcal-1.4 kombu-4.2.1 numpy-1.15.4 opencv-python-3.4.4.19 openpyxl-2.5.12 pandas-0.23.4 pdfminer.six-20181108 pycryptodome-3.7.2 python-dateutil-2.7.5 pytz-2018.7 six-1.11.0 sortedcontainers-2.1.0 vine-1.1.4
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
PS C:\excalibur> excalibur initdb
Creating new Excalibur configuration file in: C:\Users\user1/excalibur/excalibur.cfg
Traceback (most recent call last):
File "c:\users\user1\appdata\local\programs\python\python37\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\user1\appdata\local\programs\python\python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\user1\AppData\Local\Programs\Python\Python37\Scripts\excalibur.exe_main
.py", line 5, in
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\excalibur\cli.py", line 10, in
from .tasks import split, extract
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\excalibur\tasks.py", line 10, in
import camelot
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\camelot_init
.py", line 8, in
from .io import read_pdf
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\camelot\io.py", line 4, in
from .handlers import PDFHandler
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\camelot\handlers.py", line 9, in
from .parsers import Stream, Lattice
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\camelot\parsers_init_.py", line 3, in
from .stream import Stream
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\camelot\parsers\stream.py", line 11, in
from .base import BaseParser
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\camelot\parsers\base.py", line 5, in
from ..utils import get_page_layout, get_text_objects
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\camelot\utils.py", line 10, in
from pdfminer.pdfparser import PDFParser
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\pdfminer\pdfparser.py", line 4, in
from .psparser import PSStackParser
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\pdfminer\psparser.py", line 11, in
from .utils import choplist
File "c:\users\user1\appdata\local\programs\python\python37\lib\site-packages\pdfminer\utils.py", line 13, in
import chardet # For str encoding detection in Py3
ModuleNotFoundError: No module named 'chardet'

@vinayak-mehta
Copy link
Member

Thanks for the report! I was able to reproduce this issue with both Python 3.7 and 3.6 on Windows (specifically WSL). This is a strange one since chardet is a dependency for pdfminer.six, used in camelot which is passing the build on Travis (on Ubuntu).

There was a related issue opened on the pdfminer.six repo recently. I'll look into why this is happening, maybe I should create a release in camelot with chardet specified in the requirements. Till then, you can install it manually using pip install chardet and run Excalibur!

@vinayak-mehta
Copy link
Member

This is fixed now with Camelot 0.4.1.

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

No branches or pull requests

2 participants