ragflow/rag
Michal Masrna b1001bf21c
fix: laws.py added missing import logging (#3501)
### What problem does this PR solve?

_Choosing Laws Chunk Method results in an error when parsing a document.
The error is caused by a missing import in the `laws.py` file._

```
Traceback (most recent call last):
  File "/ragflow/rag/svr/task_executor.py", line 445, in handle_task
    do_handle_task(task)
  File "/ragflow/rag/svr/task_executor.py", line 384, in do_handle_task
    cks = build(r)
          ^^^^^^^^
  File "/ragflow/rag/svr/task_executor.py", line 196, in build
    cks = chunker.chunk(row["name"], binary=binary, from_page=row["from_page"],
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ragflow/rag/app/laws.py", line 161, in chunk
    for txt, poss in pdf_parser(filename if not binary else binary,
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ragflow/rag/app/laws.py", line 124, in __call__
    logging.debug("layouts:".format(
    ^^^^^^^
NameError: name 'logging' is not defined. Did you forget to import 'logging'

```

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [ ] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):

Co-authored-by: Michal Masrna <m.marna1@gmail.com>
2024-11-19 22:01:08 +08:00
..
app fix: laws.py added missing import logging (#3501) 2024-11-19 22:01:08 +08:00
llm Add api for sessions and add max_tokens for tenant_llm (#3472) 2024-11-19 14:51:33 +08:00
nlp fix(rag): fix error in viewing document chunk and cannot start task_executor server (#3481) 2024-11-19 14:36:10 +08:00
res Format file format from Windows/dos to Unix (#1949) 2024-08-15 09:17:36 +08:00
svr Introduced beartype (#3460) 2024-11-18 17:38:17 +08:00
utils Changed requirement to python 3.10 (#3496) 2024-11-19 18:25:04 +08:00
__init__.py
benchmark.py Fix logs. Use dict.pop instead of del. Close #3473 (#3484) 2024-11-19 14:15:25 +08:00
raptor.py Introduced beartype (#3460) 2024-11-18 17:38:17 +08:00
settings.py Rework logging (#3358) 2024-11-12 17:35:13 +08:00