dputhier / pygtftk

A python package and a set of shell commands to handle GTF files
GNU General Public License v3.0
45 stars 6 forks source link

Error with pyparsing #166

Closed dputhier closed 3 years ago

dputhier commented 3 years ago

I think this one seems to be related to a backward compatibility issue of pyparsing. It seems that the latests version (from 3.0.0 ?, to be checked) does not support the operatorPrecedence method anymore...

I fixed that using

pip install pyparsing==2.2.1.

We have to fixe that for the next version of pygtftk.

DP

root@1134485c1ad7:/tmp/pygtftk# gtftk
Traceback (most recent call last):
  File "/usr/local/bin/gtftk", line 4, in <module>
    __import__('pkg_resources').run_script('pygtftk==1.4.0.dev0+7173', 'gtftk')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 667, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1463, in run_script
    exec(code, namespace, namespace)
  File "/usr/local/lib/python3.8/dist-packages/pygtftk-1.4.0.dev0+7173-py3.8-linux-x86_64.egg/EGG-INFO/scripts/gtftk", line 27, in <module>
    from pygtftk.cmd_manager import CmdManager
  File "/usr/local/lib/python3.8/dist-packages/pygtftk-1.4.0.dev0+7173-py3.8-linux-x86_64.egg/pygtftk/cmd_manager.py", line 26, in <module>
    import pygtftk.utils
  File "/usr/local/lib/python3.8/dist-packages/pygtftk-1.4.0.dev0+7173-py3.8-linux-x86_64.egg/pygtftk/utils.py", line 17, in <module>
    from pyparsing import Literal, CaselessLiteral, oneOf, nums, Word, Combine, Optional, operatorPrecedence, opAssoc, \
ImportError: cannot import name 'operatorPrecedence' from 'pyparsing' (/usr/local/lib/python3.8/dist-packages/pyparsing/__init__.py)
dputhier commented 3 years ago

It also works with:

pip install pyparsing==2.4.7

But failed starting at version 3.0.0 (and 3.0.1, 3.0.2, 3.0.3, 3.0.4)