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: '.'
Created attachment 1628200 [details] File: backtrace
Created attachment 1628201 [details] File: cgroup
Created attachment 1628202 [details] File: cpuinfo
Created attachment 1628203 [details] File: environ
Created attachment 1628204 [details] File: mountinfo
Created attachment 1628205 [details] File: namespaces
Created attachment 1628206 [details] File: open_fds
> 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 ...
[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.
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?
(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'
(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
Do you have this installed?: $ rpm -qf /usr/lib/python3.7/site-packages/xdg/BaseDirectory.py python3-pyxdg-0.26-5.fc31.noarch
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'
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?
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.
*** This bug has been marked as a duplicate of bug 1770072 ***
(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
FEDORA-2019-6398f828eb has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6398f828eb
FEDORA-2019-8eb6c00da1 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8eb6c00da1
FEDORA-2019-41b9e70195 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-41b9e70195
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
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
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
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.
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.