https://bugzilla.redhat.com/show_bug.cgi?id=1713963
--- Comment #8 from Mike FABIAN <mfabian(a)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 &lt;mfabian(a)redhat.com&gt;, Anish Patil
&lt;anish.developer(a)gmail.com&gt;</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 &lt;mfabian(a)redhat.com&gt;, Anish Patil
&lt;anish.developer(a)gmail.com&gt;</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???
--
You are receiving this mail because:
You are on the CC list for the bug.