Bug 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] Fedora | Reporter: | Satyendra Singh <satyendrax> | ||||||||||||||||
| Component: | ibus-typing-booster | Assignee: | Mike FABIAN <mfabian> | ||||||||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||||||||
| Priority: | unspecified | ||||||||||||||||||
| Version: | 30 | CC: | anish.developer, i18n-bugs, mfabian | ||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||
| Hardware: | x86_64 | ||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||
| URL: | https://retrace.fedoraproject.org/faf/reports/bthash/b9a2a100b17f3b7f1803270935b2fa7a64b2d80f | ||||||||||||||||||
| Whiteboard: | abrt_hash:a57581355f40a89196828c901bccde0c5db8a7c4;VARIANT_ID=workstation; | ||||||||||||||||||
| Fixed In Version: | ibus-typing-booster-2.7.3-1.fc30 ibus-typing-booster-2.7.3-1.fc31 | Doc Type: | If docs needed, set a value | ||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||
| Last Closed: | 2019-11-12 08:56:08 UTC | Type: | --- | ||||||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||||||
| Documentation: | --- | CRM: | |||||||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||
| Embargoed: | |||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
Created attachment 1573535 [details]
File: backtrace
Created attachment 1573536 [details]
File: cgroup
Created attachment 1573537 [details]
File: cpuinfo
Created attachment 1573538 [details]
File: environ
Created attachment 1573539 [details]
File: mountinfo
Created attachment 1573540 [details]
File: namespaces
Created attachment 1573541 [details]
File: open_fds
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>, Anish Patil <anish.developer></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>, Anish Patil <anish.developer></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???
*** This bug has been marked as a duplicate of bug 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. |
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: '.'