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

'PDFFigure2PaperParser' object has no attribute 'pdf' #6

Open
rogerfedererforever opened this issue Aug 25, 2023 · 9 comments
Open

Comments

@rogerfedererforever
Copy link

error
请问这个报错如何解决?

@MasterYip
Copy link
Owner

可能是你的PDF文件路径输入有误,导致PDF文件没有找到。可以尝试运行readme中的示例,检查是否能正常运行

@MasterYip
Copy link
Owner

如果路径中存在空格 请用双引号括起来

@rogerfedererforever
Copy link
Author

why
还是不行,我用了最简单的路径也报错了,用了示例也报错了

@MasterYip
Copy link
Owner

抱歉,刚才仔细看了一下,原因可能是你系统中没有Java环境。config.py中默认使用PDFFIGURE2进行图片识别,这需要java环境

# PDFFigure2
USE_PDFFIGURE2 = True       # Use PDFFigure2 to generate images & tables (This requires you to install JVM)
SNAP_WITH_CAPTION = True    # Generate images & tables with caption (Only valid when USE_PDFFIGURE2 is True)

所以你可以将USE_PDFFIGURE2设置为False

USE_PDFFIGURE2 = False

以使用原来的图片识别方式(图片识别效果有所不同)

@MasterYip
Copy link
Owner

感谢反馈~

@rogerfedererforever
Copy link
Author

微信截图_20230825194314
修改完了设置还是有报错,运行示例一直在0%

@MasterYip
Copy link
Owner

我查看了一下OpenAI API文档,他们将API接口URL更换了:
APIBASE = "https://api.openai.com/v1"
目前已经修改代码,不再显式定义APIBASE,以适应APIBASE更换的情况

@MasterYip
Copy link
Owner

另外MIT.pdf的报错是因为abstract摘要没有在文中找到。这可能与部分期刊的摘要不包含abstract关键字有关,以后会增强识别的鲁棒性~

@MasterYip
Copy link
Owner

如果使用中还遇到什么问题,可以联系QQ 2205929492 : )

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