Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image preview not shown #16

Open
2 tasks done
eboileau opened this issue Jan 26, 2024 · 1 comment
Open
2 tasks done

Image preview not shown #16

eboileau opened this issue Jan 26, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@eboileau
Copy link
Collaborator

Is there an existing issue for this?

  • I checked the documentation and found no answer
  • This bug has not already been reported

A clear and concise description of what the issue is.

The dataset curator shows a default display, but on the dataset explorer, there is No preview image found. This may be related to this issue.

Output or error messages.

The logs report

[Fri Jan 26 16:13:22.588563 2024] [cgi:error] [pid 2471557] [client 10.250.140.13:45038] AH01215: File to static image does not exist.  Skipping attempted symlink.: /var/www/cgi/save_default_display.cgi, referer: https://dhart.dieterichlab.org/dataset_curator.html

Anything else?

No response

What browser were you using?

Firefox, Chrome

@eboileau eboileau added the bug Something isn't working label Jan 26, 2024
@eboileau eboileau self-assigned this Jan 26, 2024
@eboileau
Copy link
Collaborator Author

In save_default_display.cgi, the file name is filename = os.path.join(DATASET_PREVIEWS_DIR, "{}.{}.png".format(dataset_id, display_id)). display_id is not None, e.g.

MariaDB [dhart_db]> SELECT * FROM dataset_preference WHERE dataset_id = "c11d7b51-de77-3115-f3c9-d5718c998a3b";
+---------+--------------------------------------+------------+--------------+
| user_id | dataset_id                           | display_id | is_multigene |
+---------+--------------------------------------+------------+--------------+
|      39 | c11d7b51-de77-3115-f3c9-d5718c998a3b |         79 |            0 |
+---------+--------------------------------------+------------+--------------+

but

ls img/dataset_previews/ | grep c11d7b51-de77-3115-f3c9-d5718c998a3b
c11d7b51-de77-3115-f3c9-d5718c998a3b.None.png

When is the image saved to disk? In save_dataset_display.cgi. Either display_id exists, or is created, and image is written to disk. Logs don't show errors related to this.

But I cannot easily reproduce this, latest attempts worked out. There seem to be some obsolete image files lying under img/dataset_previews/ which do not match any display in the curator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant