lichengunc / refer-parser2

Referring Expression Parser
26 stars 7 forks source link

Exception while parsing sentences #4

Closed abhinavkaul95 closed 3 years ago

abhinavkaul95 commented 3 years ago

While executing the following command:

python parse_sents.py --dataset refcoco --splitBy unc --num_workers 4

I am getting the following error:

Traceback (most recent call last): File "parse_sents.py", line 18, in <module> from pyutils.corenlp import StanfordCoreNLP File "/media/disk/user/abhinav/refer-parser2/pyutils/corenlp/__init__.py", line 13, in <module> from .corenlp import StanfordCoreNLP, ParserError, TimeoutError, ProcessError File "/media/disk/user/abhinav/refer-parser2/pyutils/corenlp/corenlp.py", line 31, in <module> from progressbar import ProgressBar, Fraction ImportError: cannot import name 'Fraction' from 'progressbar' (venv/lib/python3.7/site-packages/progressbar/__init__.py)

Following is my requirements.txt:

cached-property==1.5.2
click==7.1.2
cycler==0.10.0
Cython==0.29.22
decorator==4.4.2
h5py==3.2.1
imageio==2.9.0
joblib==1.0.1
kiwisolver==1.3.1
matplotlib==3.3.4
networkx==2.5
nltk==3.5
numpy==1.20.1
pexpect==4.8.0
Pillow==8.1.2
pkg-resources==0.0.0
progressbar==2.5
ptyprocess==0.7.0
pyparsing==2.4.7
python-dateutil==2.8.1
PyWavelets==1.1.1
regex==2021.3.17
scikit-image==0.18.1
scipy==1.1.0
six==1.15.0
tifffile==2021.3.17
tqdm==4.59.0
abhinavkaul95 commented 3 years ago

Solved the issue by change the import from from progressbar import ProgressBar, Fraction to from .progressbar import ProgressBar, Fraction