clips / clips/pattern

setup on Python 2.7 is starting to break

Open
#293 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.9k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Latest versions of pdfminer are no longer compatible with Python 2.7, which results in the install of pattern failing as well because pdfminer expects Python 3.6 or higher, but does not check for this.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-6LDKdm/pdfminer/setup.py", line 71, in <module>
    'Topic :: Text Processing',
  File "pattern-test/.env/local/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/tmp/pip-install-6LDKdm/pdfminer/setup.py", line 11, in run
    from pdfminer.cmapdb import convert_cmap
  File "/tmp/pip-install-6LDKdm/pdfminer/pdfminer/cmapdb.py", line 22, in <module>
    from .psparser import PSStackParser
  File "/tmp/pip-install-6LDKdm/pdfminer/pdfminer/psparser.py", line 4, in <module>
    from .utils import choplist
  File "/tmp/pip-install-6LDKdm/pdfminer/pdfminer/utils.py", line 219, in <module>
    0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff,
  File "/tmp/pip-install-6LDKdm/pdfminer/pdfminer/utils.py", line 187, in <genexpr>
    PDFDocEncoding = ''.join(chr(x) for x in (
ValueError: chr() arg not in range(256)

Can be solved by installing pdfminer==20140328 first.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Python 2.7 installation failure using the traceback and the noted pdfminer==20140328 workaround. Inspect the project's dependency and setup configuration to determine how pdfminer is selected. Done means installation no longer fails on Python 2.7 without manual dependency installation, with the supported behavior verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.