https://bugzilla.redhat.com/show_bug.cgi?id=1764520
Bug ID: 1764520 Summary: [abrt] ibus-typing-booster: makedirs(): os.py:221:makedirs:FileExistsError: [Errno 17] File exists: '/home/liting/.local/share/ibus-typing-booster/data' Product: Fedora Version: 30 Hardware: x86_64 Status: NEW Whiteboard: abrt_hash:b46ec76f84c8b3b39dc8714416fdf9384c0a26db;VAR IANT_ID=workstation; Component: ibus-typing-booster Assignee: mfabian@redhat.com Reporter: 1419004855@qq.com QA Contact: extras-qa@fedoraproject.org CC: anish.developer@gmail.com, i18n-bugs@lists.fedoraproject.org, mfabian@redhat.com Target Milestone: --- Classification: Fedora
Description of problem: I deleted my /home/user/.config directory and I could not use my Chinese input source after that
Version-Release number of selected component: ibus-typing-booster-2.6.0-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-1.fc30.x86_64 kernel: 5.0.9-301.fc30.x86_64 runlevel: N 5 type: Python3 uid: 1000
Truncated backtrace: os.py:221:makedirs:FileExistsError: [Errno 17] File exists: '/home/liting/.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/liting/.local/share/ibus-typing-booster/data'
Local variables in innermost frame: name: '/home/liting/.local/share/ibus-typing-booster/data' mode: 511 exist_ok: False head: '/home/liting/.local/share/ibus-typing-booster' tail: 'data' cdir: '.'
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
1419004855@qq.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=1764520
--- Comment #1 from 1419004855@qq.com --- Created attachment 1628200 --> https://bugzilla.redhat.com/attachment.cgi?id=1628200&action=edit File: backtrace
--- Comment #2 from 1419004855@qq.com --- Created attachment 1628201 --> https://bugzilla.redhat.com/attachment.cgi?id=1628201&action=edit File: cgroup
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #3 from 1419004855@qq.com --- Created attachment 1628202 --> https://bugzilla.redhat.com/attachment.cgi?id=1628202&action=edit File: cpuinfo
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #4 from 1419004855@qq.com --- Created attachment 1628203 --> https://bugzilla.redhat.com/attachment.cgi?id=1628203&action=edit File: environ
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #5 from 1419004855@qq.com --- Created attachment 1628204 --> https://bugzilla.redhat.com/attachment.cgi?id=1628204&action=edit File: mountinfo
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #6 from 1419004855@qq.com --- Created attachment 1628205 --> https://bugzilla.redhat.com/attachment.cgi?id=1628205&action=edit File: namespaces
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #7 from 1419004855@qq.com --- Created attachment 1628206 --> https://bugzilla.redhat.com/attachment.cgi?id=1628206&action=edit File: open_fds
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(1419004855@qq.com | |)
--- Comment #8 from Mike FABIAN mfabian@redhat.com ---
File exists: '/home/liting/.local/share/ibus-typing-booster/data'
indicates that /home/liting/.local/share/ibus-typing-booster/data exists *and* is a *File*, not a *directory*. It should either not exist or be a directory.
I can reproduce this problem only if I create a file /home/liting/.local/share/ibus-typing-booster/data manually. But I have no idea how that is possible without creating this file manually. I wonder how that file can be created.
Can you please check whether the file has any contents and if yes what contents? Maybe the contents would give a hint who created that file ...
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
1419004855@qq.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(1419004855@qq.com | |) |
--- Comment #9 from 1419004855@qq.com --- [liting@localhost ibus-typing-booster]$ ls -l total 0 drwxrwxr-x. 2 liting liting 6 Oct 23 16:41 data It is an empty directory, and I am quite sure I did not create this directory manually.
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #10 from Mike FABIAN mfabian@redhat.com --- Yes, this directory is created by ibus-typing-booster when it first runs. That is OK. As long as it is a directory, empty or not, it should not cause a problem.
Can you try this and see whether it behaves differently on your system?:
[mfabian@localhost ~]$ python3 Python 3.7.4 (default, Aug 12 2019, 14:45:07) [GCC 9.1.1 20190605 (Red Hat 9.1.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import xdg.BaseDirectory >>> xdg.BaseDirectory.save_data_path('ibus-typing-booster/data') '/home/mfabian/.local/share/ibus-typing-booster/data' >>>
So this worked. Now I remove the empty directory:
[mfabian@localhost ~]$ rmdir /home/mfabian/.local/share/ibus-typing-booster/data [mfabian@localhost ~]$ python3 Python 3.7.4 (default, Aug 12 2019, 14:45:07) [GCC 9.1.1 20190605 (Red Hat 9.1.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import xdg.BaseDirectory >>> xdg.BaseDirectory.save_data_path('ibus-typing-booster/data') '/home/mfabian/.local/share/ibus-typing-booster/data' >>>
Still works. I remove the empty directory again:
[mfabian@localhost ~]$ rmdir /home/mfabian/.local/share/ibus-typing-booster/data
And create a file in its place:
[mfabian@localhost ~]$ touch /home/mfabian/.local/share/ibus-typing-booster/data
And try again:
[mfabian@localhost ~]$ python3 Python 3.7.4 (default, Aug 12 2019, 14:45:07) [GCC 9.1.1 20190605 (Red Hat 9.1.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import xdg.BaseDirectory >>> xdg.BaseDirectory.save_data_path('ibus-typing-booster/data') Traceback (most recent call last): File "<stdin>", line 1, in <module> 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' >>>
Now it fails with exactly the error message you are getting.
What happens on your system when you do the above simple tests in python3?
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #11 from 1419004855@qq.com --- (base) [liting@localhost data]$ python3 Python 3.7.4 (default, Aug 13 2019, 20:35:49) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.
import xdg.BaseDirectory
Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'xdg
************** After I install xdg:
import xdg.BaseDirectory
Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'xdg.BaseDirectory'
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW
--- Comment #12 from Mike FABIAN mfabian@redhat.com --- (In reply to 1419004855 from comment #11)
(base) [liting@localhost data]$ python3 Python 3.7.4 (default, Aug 13 2019, 20:35:49) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.
import xdg.BaseDirectory
Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'xdg
After I install xdg:
import xdg.BaseDirectory
Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'xdg.BaseDirectory'
That is really wierd because the backtrace in your first comment contains:
File "/usr/lib/python3.7/site-packages/xdg/BaseDirectory.py", line 70, in save_data_path
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #13 from Mike FABIAN mfabian@redhat.com --- Do you have this installed?:
$ rpm -qf /usr/lib/python3.7/site-packages/xdg/BaseDirectory.py python3-pyxdg-0.26-5.fc31.noarch
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #14 from 1419004855@qq.com --- I deactivate my Anaconda environment and everything looks exactly the same as that happenend in your machine.
[liting@localhost data]$ conda deactivate [liting@localhost data]$ python3 Python 3.7.4 (default, Jul 9 2019, 16:32:37) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information.
import xdg.BaseDirectory xdg.BaseDirectory.save_data_path('ibus-typing-booster/data')
'/home/liting/.local/share/ibus-typing-booster/data'
[liting@localhost data]$ rmdir /home/liting/.local/share/ibus-typing-booster/data [liting@localhost data]$ touch /home/liting/.local/share/ibus-typing-booster/data [liting@localhost data]$ python3 Python 3.7.4 (default, Jul 9 2019, 16:32:37) [GCC 9.1.1 20190503 (Red Hat 9.1.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information.
import xdg.BaseDirectory xdg.BaseDirectory.save_data_path('ibus-typing-booster/data')
Traceback (most recent call last): File "<stdin>", line 1, in <module> 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/liting/.local/share/ibus-typing-booster/data'
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #15 from Mike FABIAN mfabian@redhat.com --- So now the problem occurs for you only when /home/liting/.local/share/ibus-typing-booster/data is a file, not a directory.
What is this anaconda environment? Does this cause the problem?
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #16 from 1419004855@qq.com --- The python3-pyxdg-0.26-5.fc31.noarch is not installed in the Anaconda environment. It seems that the problem did not occur again and thank you for your help.
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
Mike FABIAN mfabian@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution|--- |DUPLICATE Last Closed| |2019-11-12 08:56:24
--- Comment #17 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=1764520
--- Comment #18 from Mike FABIAN mfabian@redhat.com --- (In reply to 1419004855 from comment #16)
The python3-pyxdg-0.26-5.fc31.noarch is not installed in the Anaconda environment. It seems that the problem did not occur again and thank you for your help.
I think I finally understood the problem now, see https://bugzilla.redhat.com/show_bug.cgi?id=1770072
https://bugzilla.redhat.com/show_bug.cgi?id=1764520
--- Comment #20 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=1764520
--- Comment #19 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=1764520
--- Comment #21 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=1764520
--- Comment #22 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=1764520
--- Comment #23 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=1764520
--- Comment #24 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=1764520
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 #25 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=1764520
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 #26 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