ImportError: cannot import name dataclass_transform

This is the error message i am getting. Havent seen this error and have no idea how to solve it.

ImportError: cannot import name dataclass_transform
2023-01-18 15:07:57.908318: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2023-01-18 15:07:57.908340: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "start_information_extractor.py", line 6, in <module>
    from queue_handler.document_queue_listner import DocumentQueueListner, QueueConfig
  File "/home/qburst/CVParsing/queue_handler/document_queue_listner.py", line 14, in <module>
    from main.billparser import MachineGeneratedBillExtractorPipeline
  File "/home/qburst/CVParsing/main/billparser/__init__.py", line 4, in <module>
    from main.billparser.models.bill_info_extractior import MachineGeneratedBillExtractorModel
  File "/home/qburst/CVParsing/main/billparser/models/bill_info_extractior.py", line 5, in <module>
    from main.billparser.models.qa_model import BillExtractorQAModel
  File "/home/qburst/CVParsing/main/billparser/models/qa_model.py", line 3, in <module>
    from haystack.nodes import TransformersReader
  File "/home/qburst/CVParsing/.env/lib/python3.8/site-packages/haystack/__init__.py", line 20, in <module>
    from haystack.schema import Document, Answer, Label, MultiLabel, Span, EvaluationResult
  File "/home/qburst/CVParsing/.env/lib/python3.8/site-packages/haystack/schema.py", line 24, in <module>
    from pydantic import BaseConfig, Field
  File "pydantic/__init__.py", line 2, in init pydantic.__init__
    #
  File "pydantic/dataclasses.py", line 39, in init pydantic.dataclasses
    # +=========+=========================================+
ImportError: cannot import name dataclass_transform

can anyone help?

Back to Top