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

How to handle "Rect" is not available in fitz #57

Closed
zjamy opened this issue Jun 28, 2022 · 1 comment
Closed

How to handle "Rect" is not available in fitz #57

zjamy opened this issue Jun 28, 2022 · 1 comment

Comments

@zjamy
Copy link

zjamy commented Jun 28, 2022

When evaluation command "run main.py --mode eval --data_type detection --config_file detection_config.json --data_root_dir ../PubTables1M-Detection-PASCAL-VOC/ --model_load_path ./pubtables1m_detection_detr_r18.pth" is executed, below error log is reported out. How to move on if we stay with python 3.9?

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
File /workspace/externalhome/XAI/table-transformer/src/main.py:22, in <module>
     20 import table_datasets as TD
     21 from table_datasets import PDFTablesDataset
---> 22 from eval import eval_coco
     25 def get_args():
     26     parser = argparse.ArgumentParser()

File /workspace/externalhome/XAI/table-transformer/src/eval.py:21, in <module>
     19 import matplotlib.pyplot as plt
     20 import matplotlib.patches as patches
---> 21 from fitz import Rect
     22 from PIL import Image
     24 sys.path.append("../detr")

ImportError: cannot import name 'Rect' from 'fitz' (/opt/conda/lib/python3.9/site-packages/fitz/__init__.py)
​```
@zjamy
Copy link
Author

zjamy commented Jun 28, 2022

I worked around it by downgrading "pip3 install PyMuPDF==1.18.10"

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

1 participant