AberystwythSystemsBiology / limbus

LImBuS is an open source, standards compliant Biobank Information Management System developed by researchers from Aberystwyth University.
GNU General Public License v3.0
34 stars 4 forks source link

Are files missing or is there a problem with this? #174

Closed KeironO closed 2 years ago

KeironO commented 2 years ago

Describe the bug

When I attempt to view any of the files on hduhb's instance, I get the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/limbus/app/decorators.py", line 81, in decorated_function
    return f(*args, **kwargs)
  File "/limbus/app/document/api.py", line 227, in document_file_get
    f = open(file.path, "rb").read()
FileNotFoundError: [Errno 2] No such file or directory: '/limbus/documents/BIOBANK-test.docx'

Have these files been removed from the file system? When I upload an example file from my own workstation and download as administrator there is no such problem.

To Reproduce Steps to reproduce the behavior:

  1. Go to Document Portal.
  2. Click on LIMBDOC-3
  3. Scroll down to Files
  4. Try to download one of BIOBANK-test.docx or 446-BioBankPolicy V4 - 08042020.docx.
  5. See error.

Expected behavior

The file to download as an attachment.

Screenshots image

Desktop (please complete the following information):

pipaLU commented 2 years ago

That file is not in the document folder. And some deleted files might still stay in the folder though, e.g.

-rw-r--r-- 1 root root   298404 Feb 10 10:18 'Evaluation form - Part-3.pdf'
-rw-r--r-- 1 root root   298404 Feb 10 10:15 'Evaluation_form - Part_3.pdf'
-rw-r--r-- 1 root root   298404 Feb 10 10:14  Evaluation_form-Part_3.pdf
-rw-r--r-- 1 root root   298404 Feb 10 10:14  Evaluation_form_Part_3.pdf
pipaLU commented 2 years ago

The file is missing might be because the image was built locally and pushed to the server. The env setting for the instance could be changed for persistence.

KeironO commented 2 years ago

Thank you for clearing this up :-)