This repository was archived by the owner on Feb 16, 2023. It is now read-only.
Replies: 1 comment 1 reply
-
|
Found the error: had a tag which contains "word" in the assignment of a tag. this seems to break the script. dont even know if it is necessary to include "*" in the tags |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I receive an error when trying to retag via commandline.
Using the same command with "-c"-option works!
~/paperless-ng $ docker-compose exec webserver document_retagger -T
[2021-03-11 12:36:57,660] [INFO] [paperless.management.retagger] Processing document 20060701_12,47
Traceback (most recent call last):
File "manage.py", line 11, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/site-packages/django/core/management/init.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/usr/src/paperless/src/documents/management/commands/document_retagger.py", line 94, in handle
replace=options['overwrite'])
File "/usr/src/paperless/src/documents/signals/handlers.py", line 131, in set_tags
matched_tags = matching.match_tags(document, classifier)
File "/usr/src/paperless/src/documents/matching.py", line 54, in match_tags
tags))
File "/usr/src/paperless/src/documents/matching.py", line 53, in
lambda o: matches(o, document) or o.pk in predicted_tag_ids,
File "/usr/src/paperless/src/documents/matching.py", line 83, in matches
if re.search(rf"\b{word}\b", document_content, **search_kwargs):
File "/usr/local/lib/python3.7/re.py", line 185, in search
return _compile(pattern, flags).search(string)
File "/usr/local/lib/python3.7/re.py", line 288, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/local/lib/python3.7/sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "/usr/local/lib/python3.7/sre_parse.py", line 924, in parse
p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)
File "/usr/local/lib/python3.7/sre_parse.py", line 420, in _parse_sub
not nested and not items))
File "/usr/local/lib/python3.7/sre_parse.py", line 645, in _parse
source.tell() - here + len(this))
re.error: nothing to repeat at position 2
Beta Was this translation helpful? Give feedback.
All reactions