jennis0 / burdoc

Advanced PDF parsing for python
MIT License
4 stars 2 forks source link

AttributeError: 'MLTableProcessor' object has no attribute 'strategy' error #17

Open mjaniec2013 opened 1 month ago

mjaniec2013 commented 1 month ago

Error when executing parser.read:

content = parser.read(pdf_file_or_content)
Traceback (most recent call last):
  File "M:\Programming\Python\projects\shared_env\Lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-54-7f1e15283134>", line 1, in <module>
    content = parser.read(pdf_file_or_content)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\OneDrive\Programming\Python\projects\shared_env\Lib\site-packages\burdoc\burdoc_parser.py", line 392, in read
    self._run_processor(processor, processor_args, pages, data, proc_instance)
  File "D:\OneDrive\Programming\Python\projects\shared_env\Lib\site-packages\burdoc\burdoc_parser.py", line 284, in _run_processor
    primary_data = BurdocParser._process_slice(slice_args)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\OneDrive\Programming\Python\projects\shared_env\Lib\site-packages\burdoc\burdoc_parser.py", line 132, in _process_slice
    processor.process(arg_dict['data'])
  File "D:\OneDrive\Programming\Python\projects\shared_env\Lib\site-packages\burdoc\processors\processor.py", line 46, in process
    self._process(data)
  File "D:\OneDrive\Programming\Python\projects\shared_env\Lib\site-packages\burdoc\processors\table_processors\ml_table_processor.py", line 57, in _process
    required_fields = self.strategy.requirements()
                      ^^^^^^^^^^^^^
AttributeError: 'MLTableProcessor' object has no attribute 'strategy'. Did you mean: 'Strategies'?

burdoc 0.2.3 Python 3.12 Windows 10