You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I upgraded Megaparse which succeeded and now I am getting the following exception on initialization.
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/bryan/dev/git/vialab/backend/janet/discovery/discover.py", line 16, in <module>
from janet.tools import parse
File "/Users/bryan/dev/git/vialab/backend/janet/tools/parse.py", line 6, in <module>
from megaparse import MegaParse
File "/Users/bryan/dev/git/vialab/backend/venv/lib/python3.11/site-packages/megaparse/__init__.py", line 1, in <module>
from .megaparse import MegaParse
File "/Users/bryan/dev/git/vialab/backend/venv/lib/python3.11/site-packages/megaparse/megaparse.py", line 7, in <module>
from megaparse_sdk.schema import document
ImportError: cannot import name 'document' from 'megaparse_sdk.schema' (/Users/bryan/dev/git/vialab/backend/venv/lib/python3.11/site-packages/megaparse_sdk/schema/__init__.py)
python-BaseException
The text was updated successfully, but these errors were encountered:
Hey @bryanhughes! I'm here to help you with any bugs, questions, or contributions you have. Let's squash those bugs together!
The ImportError you're encountering suggests that the document component might not be directly importable from megaparse_sdk.schema. However, the Document class is still part of the megaparse_sdk.schema module, as it is defined in the document.py file within that module [1].
To resolve this issue, you can try importing the Document class directly from megaparse_sdk.schema.document instead of megaparse_sdk.schema. Here's how you can modify your import statement:
frommegaparse_sdk.schema.documentimportDocument
This should help you access the Document class without encountering the import error.
Hi, I had the same problem on my windows machine. I did a pip uninstall megaparse-sdk and then a pip install megaparse-sdk.
This upgraded megaparse-sdk from 0.1.10 to 0.1.12, and the problem went away
I upgraded Megaparse which succeeded and now I am getting the following exception on initialization.
The text was updated successfully, but these errors were encountered: