paperless-ngx / paperless-ngx

A community-supported supercharged version of paperless: scan, index and archive all your physical documents
https://docs.paperless-ngx.com
GNU General Public License v3.0
19.88k stars 1.09k forks source link

Document Exporter error #7951

Closed JoeBeaver-bit closed 2 hours ago

JoeBeaver-bit commented 2 hours ago

Description

I have been trying to export the database using the document exporter and get error message:

File "/usr/src/paperless/src/manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 402, in run_from_argv self.execute(*args, *cmd_options) File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 448, in execute output = self.handle(args, **options) File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 186, in handle self.dump(options["no_progress_bar"]) File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 360, in dump self.check_and_copy( File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 441, in check_and_copy copy_file_with_basic_stats(source, target) File "/usr/src/paperless/src/documents/utils.py", line 42, in copy_file_with_basic_stats shutil.copy(source, dest) File "/usr/local/lib/python3.9/shutil.py", line 427, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/local/lib/python3.9/shutil.py", line 266, in copyfile with open(dst, 'wb') as fdst: FileNotFoundError: [Errno 2] No such file or directory: '/usr/src/paperless/export/2022-11-03 xxx.pdf'

Have been trying to handle it by deleting the respective file over paperless GUI but with no success. After doing so the error message repeats with another file.

Steps to reproduce

executing command sudo docker-compose exec webserver document_exporter ../export/

error appears again and again

Webserver logs

File "/usr/src/paperless/src/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 186, in handle
    self.dump(options["no_progress_bar"])
  File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 360, in dump
    self.check_and_copy(
  File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 441, in check_and_copy
    copy_file_with_basic_stats(source, target)
  File "/usr/src/paperless/src/documents/utils.py", line 42, in copy_file_with_basic_stats
    shutil.copy(source, dest)
  File "/usr/local/lib/python3.9/shutil.py", line 427, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/lib/python3.9/shutil.py", line 266, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/src/paperless/export/2022-11-03 xxx.pdf'

Browser logs

No response

Paperless-ngx version

1.17.4

Host OS

Synology

Installation method

Docker - linuxserver.io image

System status

No response

Browser

No response

Configuration changes

No response

Please confirm the following

shamoon commented 2 hours ago

This is not a paperless bug, the exporter is not broken. I'll convert this into an issue because it clearly has to do with your installation.