Bug 498081 - Report can't save images
Summary: Report can't save images
Status: REPORTED
Alias: None
Product: tellico
Classification: Applications
Component: general (show other bugs)
Version: 4.0.1
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Robby Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-31 10:06 UTC by smartinds
Modified: 2025-01-03 23:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description smartinds 2024-12-31 10:06:17 UTC
I can't save reports with images

STEPS TO REPRODUCE
1. After filter, clic in "Report" button.
2. Select "One Entry Per Page"/"Image List"/"Image Grid" and "Save as" button.
3. Saves as HTML

This only generates one html file without images, It's because the <img src> tag is pointing to a directory that doesn't exist, for example:

src="/tmp/tellico-ElVINw/765e20e120513872c4c1a29df1052f72.jpeg"

The temporal solution is create the directory in tmp:
mkdir tellico-ElVINw
And decompress the ".tc file" and copy the images.

More info: I installed from flathub: org.kde.tellico

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20241226
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.12.6-1-default (64-bit)
Graphics Platform: X11
Processors: 24 × 13th Gen Intel® Core™ i7-13700HX
Memory: 31.1 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4070 Laptop GPU/PCIe/SSE2
Manufacturer: Acer
Product Name: Predator PH16-71
System Version: V1.16
Comment 1 Robby Stephenson 2024-12-31 15:26:54 UTC
(In reply to smartinds from comment #0)
> I can't save reports with images
> 
> STEPS TO REPRODUCE
> 1. After filter, clic in "Report" button.
> 2. Select "One Entry Per Page"/"Image List"/"Image Grid" and "Save as"
> button.
> 3. Saves as HTML
> 
> This only generates one html file without images, It's because the <img src>
> tag is pointing to a directory that doesn't exist, for example:
 
> More info: I installed from flathub: org.kde.tellico

It may be related to being a flatpak installation since I can't reproduce this quite yet. Thanks for the bug report, I'll see if I can figure out how to use flatpak
Comment 2 Robby Stephenson 2025-01-01 15:52:35 UTC
I can't reproduce this yet, with or without flatpak, and whether a filter is applied or not. Can you tell me what setting you have for the image locations? (whether in the data file, common directory, or local directory to file?)

Can you run tellico with the --log option and see if the relevant image copying is occurring?
Comment 3 smartinds 2025-01-01 18:47:00 UTC
Of course, my tc file is in "/home/zchronos/coleccion.tc" and when I exec:
$> /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=tellico org.kde.tellico

Qt: Session management error: Could not open network socket
[13:41:22] "applications.menu"  not found in  QList()
[13:41:37] WARNING Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.Disconnected" 
 "Not connected to D-Bus server"
[13:44:04] [ /run/build-runtime/kio/src/kioworkers/file/file_unix.cpp:540  FileProtocol::copy ] copy() QUrl("file:///tmp/tellico-zoqzmp/d38b0ae8780def9622c441af76f2768f.jpeg") to QUrl("file:///run/user/1000/doc/bf6e4ef3/myhtml_files/d38b0ae8780def9622c441af76f2768f.jpeg") mode= -1
[13:44:04] WARNING can't copy  QUrl("file:///run/user/1000/doc/bf6e4ef3/myhtml_files/d38b0ae8780def9622c441af76f2768f.jpeg")
[13:44:04] WARNING "Could not write to /run/user/1000/doc/bf6e4ef3/myhtml_files/d38b0ae8780def9622c441af76f2768f.jpeg."
[13:44:04] [ /run/build-runtime/kio/src/kioworkers/file/file_unix.cpp:540  FileProtocol::copy ] copy() QUrl("file:///tmp/tellico-zoqzmp/765e20e120513872c4c1a29df1052f72.jpeg") to QUrl("file:///run/user/1000/doc/bf6e4ef3/myhtml_files/765e20e120513872c4c1a29df1052f72.jpeg") mode= -1
[13:44:04] WARNING can't copy  QUrl("file:///run/user/1000/doc/bf6e4ef3/myhtml_files/765e20e120513872c4c1a29df1052f72.jpeg")
[13:44:04] WARNING "Could not write to /run/user/1000/doc/bf6e4ef3/myhtml_files/765e20e120513872c4c1a29df1052f72.jpeg."
[13:44:04] [ /run/build-runtime/kio/src/kioworkers/file/file_unix.cpp:540  FileProtocol::copy ] copy() QUrl("file:///tmp/tellico-zoqzmp/f81eed095ff1b0a2b800a968552fe6f1.avif") to QUrl("file:///run/user/1000/doc/bf6e4ef3/myhtml_files/f81eed095ff1b0a2b800a968552fe6f1.avif") mode= -1
........ (many lines)
[13:44:04] [ /run/build-runtime/kio/src/kioworkers/file/file_unix.cpp:540  FileProtocol::copy ] copy() QUrl("file:///tmp/tellico-zoqzmp/1d85edc8faa72d68bf73ceeb7782cc8f.jpeg") to QUrl("file:///run/user/1000/doc/bf6e4ef3/myhtml_files/1d85edc8faa72d68bf73ceeb7782cc8f.jpeg") mode= -1
[13:44:04] WARNING can't copy  QUrl("file:///run/user/1000/doc/bf6e4ef3/myhtml_files/1d85edc8faa72d68bf73ceeb7782cc8f.jpeg")
[13:44:04] WARNING "Could not write to /run/user/1000/doc/bf6e4ef3/myhtml_files/1d85edc8faa72d68bf73ceeb7782cc8f.jpeg."
Comment 4 Robby Stephenson 2025-01-03 23:11:21 UTC
(In reply to smartinds from comment #3)
> [13:44:04] WARNING can't copy 
> QUrl("file:///run/user/1000/doc/bf6e4ef3/myhtml_files/
> d38b0ae8780def9622c441af76f2768f.jpeg")

Can you check the permissions on the /run/user/1000/doc/ directory? And the bf6e4ef3/ directory within it? I don't know if Tellico is failing to create proper directories or permissions maybe, or if there's something not working right with it's interaction with the flatpak environment. That directory is where you chose to save the report html file?