Skip to content

str object has no attribute 'choices' #848

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

Open
4 tasks done
iridescentboy opened this issue Apr 17, 2025 · 9 comments
Open
4 tasks done

str object has no attribute 'choices' #848

iridescentboy opened this issue Apr 17, 2025 · 9 comments
Labels
bug Something isn't working

Comments

@iridescentboy
Copy link

在提问之前...

  • 我已经搜索了现有的 issues
  • 我在提问题之前至少花费了 5 分钟来思考和准备
  • 我已经认真且完整的阅读了 wiki
  • 我已经认真检查了问题和网络环境无关(包括但不限于Google不可用,模型下载失败)

使用的环境

- OS:window
- Python:3.12
- pdf2zh:1.90

请选择安装方式

pip

描述你的问题

pdf2zh 工具在转换 PDF 文件时遇到了 str object has no attribute 'choices'

Image

如何复现

  1. 执行 '...'
  2. 选择 '....'
  3. 出现问题

预期行为

No response

相关 Logs


原始PDF文件

No response

还有别的吗?

No response

@iridescentboy iridescentboy added the bug Something isn't working label Apr 17, 2025
@hellofinch
Copy link
Contributor

启用BabelDOC选项再尝试。

@awwaawwa
Copy link
Collaborator

他这个是llm相关问题

@iridescentboy
Copy link
Author

启用BabelDOC选项再尝试。

我用babeldoc 后,他不翻译成中文

@iridescentboy
Copy link
Author

他这个是llm相关问

他这个是llm相关问题

换模型吗?不用openai 的

@hellofinch
Copy link
Contributor

他这个是llm相关问题

1.x的报错看着太折磨了。我以为还是之前那个字体的问题呢。

@awwaawwa
Copy link
Collaborator

请等待pdf2zh 2.0

@Byaidu
Copy link
Owner

Byaidu commented Apr 19, 2025

@awwaawwa 要不然给openai那个锁下版本吧,这也是常见问题了

@awwaawwa
Copy link
Collaborator

@awwaawwa 要不然给openai那个锁下版本吧,这也是常见问题了

这个错误应该和openai库没关系吧。可能是和相关配置有关,baseurl key model啥的吧

@awwaawwa
Copy link
Collaborator

awwaawwa commented May 8, 2025

请用2.0预览版重试
如果2.0预览版有问题,请贴出完整日志

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants