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

Bug with llama-parser 0.6.0: megaparse_sdk/schema/mp_outputs.py -> from llama_parse.base import Dict #224

Open
nekopep opened this issue Feb 9, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@nekopep
Copy link

nekopep commented Feb 9, 2025

Bug with llama-parser == 0.6.0.
Current version is not compatible with latest version of llama-parser and when run pop this error:
File "/xxx/Documents/experiments/xxx/venv/lib/python3.11/site-packages/megaparse/init.py", line 1, in
from .megaparse import MegaParse
File "/xxx/Documents/experiments/xxx/venv/lib/python3.11/site-packages/megaparse/megaparse.py", line 7, in
from megaparse_sdk.schema.extensions import FileExtension
File "/xxx/Documents/experiments/xxx/venv/lib/python3.11/site-packages/megaparse_sdk/init.py", line 1, in
from .client import MegaParseClient
File "/xxx/Documents/experiments/xxx/venv/lib/python3.11/site-packages/megaparse_sdk/client.py", line 29, in
from megaparse_sdk.schema.mp_outputs import (
File "/xxx/Documents/experiments/xxx/venv/lib/python3.11/site-packages/megaparse_sdk/schema/mp_outputs.py", line 3, in
from llama_parse.base import Dict
ImportError: cannot import name 'Dict' from 'llama_parse.base' (/xxx/Documents/experiments/xxx/venv/lib/python3.11/site-packages/llama_parse/base.py)
python-BaseException

Fix:
pip install llama-parse=="0.5.20"

Copy link

dosubot bot commented Feb 9, 2025

Hello, @nekopep! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this issue together!

The error you're encountering is due to the Dict import from llama_parse.base in the megaparse_sdk/schema/mp_outputs.py file. This import is used to define the type of the metadata field in the MPOutput class as a dictionary with string keys and values [1].

To resolve this issue, you can downgrade llama-parse to version 0.5.20, as suggested, by running:

pip install llama-parse=="0.5.20"

This will revert to a version where the Dict import is available. Alternatively, you might want to check if there are any updates or patches in the MegaParse repository that address compatibility with llama-parser version 0.6.0.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the bug Something isn't working label Feb 9, 2025
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

1 participant