#1136367 onionshare: AttributeError object has no attribute 'filename'

Package:
onionshare
Source:
onionshare
Submitter:
Jeffrey Cliff
Date:
2026-07-11 20:03:02 UTC
Severity:
normal
Tags:
#1136367#5
Date:
2026-05-12 18:28:46 UTC
From:
To:
Dear Maintainer,

something triggered this error probably when i clicked 'start sharing'

AttributeError: 'PySide6.QtWidgets.QListWidgetItem' object has no
attribute 'filename'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/onionshare/tab/mode/file_selection.py",
line 430, in update
    self.save_filenames()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/onionshare/tab/mode/file_selection.py",
line 524, in save_filenames
    filenames = self.get_filenames()
  File "/usr/lib/python3/dist-packages/onionshare/tab/mode/file_selection.py",
line 517, in get_filenames
    filenames.append(self.file_list.item(index).filename)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

i'm guessing one of the files i have has been moved since i added it
to the list of files
to share but without further data it's hard to know what exactly
causes this error.
perhaps if it's going to emit this error, to print some information in
the error to clarify what exactly is going on

#1136367#10
Date:
2026-07-11 10:28:23 UTC
From:
To:
Hey,

I tried myself with 2.6.4 and flask-socketio 5.6.1-0.1 and the sharing works
for me without any issue. Can you recheck with those versions?

Maybe you are able to create a reproducible way to trigger it, than we are
able to send this bug upstream.


Regards,

hefee

#1136367#17
Date:
2026-07-11 19:59:48 UTC
From:
To:
This doesn't seem to be reproducible anymore : onionshare sort-of
correctly handles the case where a file is removed (ie next time that
onionshare starts, it checks which files exist/don't exist, displays
an error popup as it should, and prunes the ones that don't exist),
and when you start onionshare it doesn't display the ones that should
be missing on the web side.