Bug 2257180 - [abrt] bottles: check_bottles(): manager.py:782:check_bottles:FileNotFoundError: [Errno 2] No such file or directory: '/home/bdp/.local/share/bottles/bottles'
Summary: [abrt] bottles: check_bottles(): manager.py:782:check_bottles:FileNotFoundErr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bottles
Version: 39
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sandro
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:16464404174af798475fe3f3f3b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-01-07 19:43 UTC by bdp
Modified: 2024-03-23 00:33 UTC (History)
7 users (show)

Fixed In Version: bottles-51.11-3.fc39 bottles-51.11-3.fc38 bottles-51.11-3.fc40
Clone Of:
Environment:
Last Closed: 2024-03-19 01:10:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (734 bytes, text/plain)
2024-01-07 19:43 UTC, bdp
no flags Details
File: environ (1.64 KB, text/plain)
2024-01-07 19:43 UTC, bdp
no flags Details
File: mountinfo (5.99 KB, text/plain)
2024-01-07 19:43 UTC, bdp
no flags Details
File: open_fds (1.39 KB, text/plain)
2024-01-07 19:43 UTC, bdp
no flags Details
File: namespaces (171 bytes, text/plain)
2024-01-07 19:43 UTC, bdp
no flags Details
File: backtrace (1.01 KB, text/plain)
2024-01-07 19:43 UTC, bdp
no flags Details
File: cpuinfo (2.83 KB, text/plain)
2024-01-07 19:43 UTC, bdp
no flags Details

Description bdp 2024-01-07 19:43:23 UTC
Version-Release number of selected component:
bottles-1:51.10-2.fc39

Additional info:
reporter:       libreport-2.17.11
kernel:         6.6.9-200.fc39.x86_64
cmdline:        /usr/bin/python3 /usr/bin/bottles /run/media/bdp/zippprogs1/cddvdburning/burn4free_setup.exe
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/dbus-:1.2-org.gnome.Nautilus
uid:            1000
reason:         manager.py:782:check_bottles:FileNotFoundError: [Errno 2] No such file or directory: '/home/bdp/.local/share/bottles/bottles'
executable:     /usr/bin/bottles
type:           Python3
package:        bottles-1:51.10-2.fc39
runlevel:       N 5
exception_type: FileNotFoundError
crash_function: check_bottles
interpreter:    python3-3.12.1-2.fc39.x86_64

Truncated backtrace:
manager.py:782:check_bottles:FileNotFoundError: [Errno 2] No such file or directory: '/home/bdp/.local/share/bottles/bottles'

Traceback (most recent call last):
  File "/usr/share/bottles/bottles/frontend/main.py", line 185, in do_command_line
    return self.__process_uri(uri)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/bottles/bottles/frontend/main.py", line 198, in __process_uri
    dialog = BottlePickerDialog(application=self, arg_exe=uri)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/bottles/bottles/frontend/windows/bottlepicker.py", line 53, in __init__
    mng.check_bottles()
  File "/usr/share/bottles/bottles/backend/managers/manager.py", line 782, in check_bottles
    bottles = os.listdir(Paths.bottles)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/bdp/.local/share/bottles/bottles'

Local variables in innermost frame:
self: <bottles.backend.managers.manager.Manager object at 0x7f7537046900>
silent: False

Comment 1 bdp 2024-01-07 19:43:27 UTC
Created attachment 2007669 [details]
File: os_info

Comment 2 bdp 2024-01-07 19:43:32 UTC
Created attachment 2007670 [details]
File: environ

Comment 3 bdp 2024-01-07 19:43:34 UTC
Created attachment 2007671 [details]
File: mountinfo

Comment 4 bdp 2024-01-07 19:43:36 UTC
Created attachment 2007672 [details]
File: open_fds

Comment 5 bdp 2024-01-07 19:43:37 UTC
Created attachment 2007673 [details]
File: namespaces

Comment 6 bdp 2024-01-07 19:43:38 UTC
Created attachment 2007674 [details]
File: backtrace

Comment 7 bdp 2024-01-07 19:43:42 UTC
Created attachment 2007675 [details]
File: cpuinfo

Comment 8 Maxwell G 2024-01-07 21:33:03 UTC
We probably need to patch bottles to make sure these directories are being created before they're accessed. I guess that flatpak handles this differently. In the meantime, bdp, can you try this?

$ mkdir -p /home/bdp/.local/share/bottles/bottles

Comment 9 bdp 2024-01-07 22:56:54 UTC
(In reply to Maxwell G from comment #8)
> We probably need to patch bottles to make sure these directories are being
> created before they're accessed. I guess that flatpak handles this
> differently. In the meantime, bdp, can you try this?
> 
> $ mkdir -p /home/bdp/.local/share/bottles/bottles

ok done

Comment 10 Sandro 2024-03-04 19:24:38 UTC
(In reply to Maxwell G from comment #8)
> We probably need to patch bottles to make sure these directories are being
> created before they're accessed. I guess that flatpak handles this
> differently. In the meantime, bdp, can you try this?

I had a glimpse through the code. In `manager.py`, which is 1,600+ lines, I could wrap the call[1] in:

try:
    bottles = os.listdir(Paths.bottles)
except FileNotFoundError:
    os.makedirs(Paths.bottles)
    bottles = []

OTOH, there's already a check in the same file in check_app_dirs()[2]. Apparently, that's not being called in certain situations (e.g. when calling an executable directly from the command line). But we could make use of it. Instead of above, call check_app_dirs(), which will create the dir if it doesn't exist.

try:
    bottles = os.listdir(Paths.bottles)
except FileNotFoundError:
    check_app_dirs()
    bottles = []

[1] https://github.com/bottlesdevs/Bottles/blob/a3a8f39744e0cc1cc5aaa8b22015de558b8d5700/bottles/backend/managers/manager.py#L814
[2] https://github.com/bottlesdevs/Bottles/blob/a3a8f39744e0cc1cc5aaa8b22015de558b8d5700/bottles/backend/managers/manager.py#L250

Comment 11 Fedora Update System 2024-03-10 19:40:19 UTC
FEDORA-2024-0dfcd5ea8e (bottles-51.11-3.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-0dfcd5ea8e

Comment 12 Fedora Update System 2024-03-10 19:40:31 UTC
FEDORA-2024-5445da7373 (bottles-51.11-3.fc38) has been submitted as an update to Fedora 38.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-5445da7373

Comment 13 Fedora Update System 2024-03-10 19:40:43 UTC
FEDORA-2024-5932cac21c (bottles-51.11-3.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-5932cac21c

Comment 14 Fedora Update System 2024-03-11 00:44:18 UTC
FEDORA-2024-5932cac21c has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-5932cac21c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-5932cac21c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2024-03-11 01:17:09 UTC
FEDORA-2024-5445da7373 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-5445da7373`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-5445da7373

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2024-03-11 01:39:53 UTC
FEDORA-2024-0dfcd5ea8e has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-0dfcd5ea8e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-0dfcd5ea8e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2024-03-19 01:10:30 UTC
FEDORA-2024-0dfcd5ea8e (bottles-51.11-3.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2024-03-19 02:00:12 UTC
FEDORA-2024-5445da7373 (bottles-51.11-3.fc38) has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2024-03-23 00:33:07 UTC
FEDORA-2024-5932cac21c (bottles-51.11-3.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.