https://bugzilla.redhat.com/show_bug.cgi?id=1713963
Bug ID: 1713963 Summary: [abrt] ibus-typing-booster: makedirs(): os.py:221:makedirs:FileExistsError: [Errno 17] File exists: '/home/uncle/.local/share/ibus-typing-booster/data' Product: Fedora Version: 30 Hardware: x86_64 Status: NEW Whiteboard: abrt_hash:a57581355f40a89196828c901bccde0c5db8a7c4;VAR IANT_ID=workstation; Component: ibus-typing-booster Assignee: mfabian@redhat.com Reporter: satyendrax@gmail.com QA Contact: extras-qa@fedoraproject.org CC: anish.developer@gmail.com, i18n-bugs@lists.fedoraproject.org, mfabian@redhat.com Target Milestone: --- Classification: Fedora
Version-Release number of selected component: ibus-typing-booster-2.6.1-1.fc30
Additional info: reporter: libreport-2.10.0 cmdline: /usr/bin/python3 /usr/share/ibus-typing-booster/engine/main.py --xml crash_function: makedirs exception_type: FileExistsError executable: /usr/share/ibus-typing-booster/engine/main.py interpreter: python3-3.7.3-3.fc30.x86_64 kernel: 5.0.17-300.fc30.x86_64 runlevel: N 5 type: Python3 uid: 1000
Truncated backtrace: os.py:221:makedirs:FileExistsError: [Errno 17] File exists: '/home/uncle/.local/share/ibus-typing-booster/data'
Traceback (most recent call last): File "/usr/share/ibus-typing-booster/engine/main.py", line 33, in <module> import factory File "/usr/share/ibus-typing-booster/engine/factory.py", line 32, in <module> import hunspell_table File "/usr/share/ibus-typing-booster/engine/hunspell_table.py", line 45, in <module> import itb_emoji File "/usr/share/ibus-typing-booster/engine/itb_emoji.py", line 73, in <module> USER_DATADIR = itb_util.xdg_save_data_path('ibus-typing-booster/data') File "/usr/share/ibus-typing-booster/engine/itb_util.py", line 3188, in xdg_save_data_path return xdg.BaseDirectory.save_data_path(*resource) File "/usr/lib/python3.7/site-packages/xdg/BaseDirectory.py", line 70, in save_data_path os.makedirs(path) File "/usr/lib64/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/uncle/.local/share/ibus-typing-booster/data'
Local variables in innermost frame: name: '/home/uncle/.local/share/ibus-typing-booster/data' mode: 511 exist_ok: False head: '/home/uncle/.local/share/ibus-typing-booster' tail: 'data' cdir: '.'
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
Satyendra Singh satyendrax@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://retrace.fedoraproje | |ct.org/faf/reports/bthash/b | |9a2a100b17f3b7f1803270935b2 | |fa7a64b2d80f
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #1 from Satyendra Singh satyendrax@gmail.com --- Created attachment 1573535 --> https://bugzilla.redhat.com/attachment.cgi?id=1573535&action=edit File: backtrace
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #2 from Satyendra Singh satyendrax@gmail.com --- Created attachment 1573536 --> https://bugzilla.redhat.com/attachment.cgi?id=1573536&action=edit File: cgroup
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #3 from Satyendra Singh satyendrax@gmail.com --- Created attachment 1573537 --> https://bugzilla.redhat.com/attachment.cgi?id=1573537&action=edit File: cpuinfo
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #4 from Satyendra Singh satyendrax@gmail.com --- Created attachment 1573538 --> https://bugzilla.redhat.com/attachment.cgi?id=1573538&action=edit File: environ
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #5 from Satyendra Singh satyendrax@gmail.com --- Created attachment 1573539 --> https://bugzilla.redhat.com/attachment.cgi?id=1573539&action=edit File: mountinfo
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #6 from Satyendra Singh satyendrax@gmail.com --- Created attachment 1573540 --> https://bugzilla.redhat.com/attachment.cgi?id=1573540&action=edit File: namespaces
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #7 from Satyendra Singh satyendrax@gmail.com --- Created attachment 1573541 --> https://bugzilla.redhat.com/attachment.cgi?id=1573541&action=edit File: open_fds
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #8 from Mike FABIAN mfabian@redhat.com --- I can reproduce this problem only when ~/.local/share/ibus-typing-booster/data exists and is a file, not a directory.
Here ~/.local/share/ibus-typing-booster/data is a directory:
mfabian@taka:~ $ ls -l ~/.local/share/ibus-typing-booster/data total 0 mfabian@taka:~ $ ls -ld ~/.local/share/ibus-typing-booster/data drwxr-xr-x. 2 mfabian mfabian 4096 Jul 8 11:39 /home/mfabian/.local/share/ibus-typing-booster/data/ mfabian@taka:~
Now start the command line from this bug report:
mfabian@taka:~ $ /usr/bin/python3 /usr/share/ibus-typing-booster/engine/main.py --xml <engines> <engine> <name>typing-booster</name> <longname>Typing Booster</longname> <language>t</language> <license>GPL</license> <author>Mike FABIAN <mfabian@redhat.com>, Anish Patil <anish.developer@gmail.com></author>
<icon>/usr/share/ibus-typing-booster/icons/ibus-typing-booster.svg</icon> <layout>default</layout> <description>A completion input method to speedup typing.</description> <symbol>🚀</symbol> <setup>/usr/libexec/ibus-setup-typing-booster</setup> <icon_prop_key>InputMode</icon_prop_key> </engine> </engines> mfabian@taka:~
Works.
Remove the directory to test the case if nothing exists:
$ rmdir ~/.local/share/ibus-typing-booster/data mfabian@taka:~ $ /usr/bin/python3 /usr/share/ibus-typing-booster/engine/main.py --xml <engines> <engine> <name>typing-booster</name> <longname>Typing Booster</longname> <language>t</language> <license>GPL</license> <author>Mike FABIAN <mfabian@redhat.com>, Anish Patil <anish.developer@gmail.com></author>
<icon>/usr/share/ibus-typing-booster/icons/ibus-typing-booster.svg</icon> <layout>default</layout> <description>A completion input method to speedup typing.</description> <symbol>🚀</symbol> <setup>/usr/libexec/ibus-setup-typing-booster</setup> <icon_prop_key>InputMode</icon_prop_key> </engine> </engines> mfabian@taka:~ $ ls -ld ~/.local/share/ibus-typing-booster/data drwxr-xr-x. 2 mfabian mfabian 4096 Jul 8 11:57 /home/mfabian/.local/share/ibus-typing-booster/data/ mfabian@taka:~ $
Works and the directory is created in the process.
Now remove the directory again and create a file instead of the directory:
mfabian@taka:~ $ rmdir ~/.local/share/ibus-typing-booster/data mfabian@taka:~ $ touch ~/.local/share/ibus-typing-booster/data mfabian@taka:~ $ ls -l ~/.local/share/ibus-typing-booster/data -rw-r--r--. 1 mfabian mfabian 0 Jul 8 11:40 /home/mfabian/.local/share/ibus-typing-booster/data mfabian@taka:~ $ /usr/bin/python3 /usr/share/ibus-typing-booster/engine/main.py --xml Traceback (most recent call last): File "/usr/share/ibus-typing-booster/engine/main.py", line 33, in <module> import factory File "/local/mfabian/src/ibus-typing-booster/engine/factory.py", line 32, in <module> import hunspell_table File "/local/mfabian/src/ibus-typing-booster/engine/hunspell_table.py", line 45, in <module> import itb_emoji File "/local/mfabian/src/ibus-typing-booster/engine/itb_emoji.py", line 73, in <module> USER_DATADIR = itb_util.xdg_save_data_path('ibus-typing-booster/data') File "/local/mfabian/src/ibus-typing-booster/engine/itb_util.py", line 3188, in xdg_save_data_path return xdg.BaseDirectory.save_data_path(*resource) File "/usr/lib/python3.7/site-packages/xdg/BaseDirectory.py", line 70, in save_data_path os.makedirs(path) File "/usr/lib64/python3.7/os.py", line 221, in makedirs mkdir(name, mode) FileExistsError: [Errno 17] File exists: '/home/mfabian/.local/share/ibus-typing-booster/data' mfabian@taka:~ $
The error in this bug occurs.
So the error reported here only can occur if ~/.local/share/ibus-typing-booster/data already exists and is a file, not a directory. How could this ever happen in practice? Do I need to add extra code to handle that case???
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution|--- |DUPLICATE Last Closed| |2019-11-12 08:56:08
--- Comment #9 from Mike FABIAN mfabian@redhat.com ---
*** This bug has been marked as a duplicate of bug 1770072 ***
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- FEDORA-2019-6398f828eb has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6398f828eb
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #11 from Fedora Update System updates@fedoraproject.org --- FEDORA-2019-8eb6c00da1 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8eb6c00da1
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #12 from Fedora Update System updates@fedoraproject.org --- FEDORA-2019-41b9e70195 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-41b9e70195
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #13 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6398f828eb
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #14 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-41b9e70195
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #15 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-8eb6c00da1
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version| |ibus-typing-booster-2.7.3-1 | |.fc30 Resolution|DUPLICATE |ERRATA
--- Comment #16 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1713963
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|ibus-typing-booster-2.7.3-1 |ibus-typing-booster-2.7.3-1 |.fc30 |.fc30 | |ibus-typing-booster-2.7.3-1 | |.fc31
--- Comment #17 from Fedora Update System updates@fedoraproject.org --- ibus-typing-booster-2.7.3-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
i18n-bugs@lists.fedoraproject.org