Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1713963 - [abrt] ibus-typing-booster: makedirs(): os.py:221:makedirs:FileExistsError: [Errno 17] File exists: '/home/uncle/.local/share/ibus-typing-booster/data'
Summary: [abrt] ibus-typing-booster: makedirs(): os.py:221:makedirs:FileExistsError: [...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus-typing-booster
Version: 30
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mike FABIAN
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:a57581355f40a89196828c901bc...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-26 07:02 UTC by Satyendra Singh
Modified: 2019-12-05 01:39 UTC (History)
3 users (show)

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:
Clone Of:
Environment:
Last Closed: 2019-11-12 08:56:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.22 KB, text/plain)
2019-05-26 07:02 UTC, Satyendra Singh
no flags Details
File: cgroup (341 bytes, text/plain)
2019-05-26 07:02 UTC, Satyendra Singh
no flags Details
File: cpuinfo (1.14 KB, text/plain)
2019-05-26 07:02 UTC, Satyendra Singh
no flags Details
File: environ (3.72 KB, text/plain)
2019-05-26 07:02 UTC, Satyendra Singh
no flags Details
File: mountinfo (3.57 KB, text/plain)
2019-05-26 07:02 UTC, Satyendra Singh
no flags Details
File: namespaces (129 bytes, text/plain)
2019-05-26 07:02 UTC, Satyendra Singh
no flags Details
File: open_fds (995 bytes, text/plain)
2019-05-26 07:02 UTC, Satyendra Singh
no flags Details

Description Satyendra Singh 2019-05-26 07:02:04 UTC
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: '.'

Comment 1 Satyendra Singh 2019-05-26 07:02:09 UTC
Created attachment 1573535 [details]
File: backtrace

Comment 2 Satyendra Singh 2019-05-26 07:02:11 UTC
Created attachment 1573536 [details]
File: cgroup

Comment 3 Satyendra Singh 2019-05-26 07:02:12 UTC
Created attachment 1573537 [details]
File: cpuinfo

Comment 4 Satyendra Singh 2019-05-26 07:02:15 UTC
Created attachment 1573538 [details]
File: environ

Comment 5 Satyendra Singh 2019-05-26 07:02:17 UTC
Created attachment 1573539 [details]
File: mountinfo

Comment 6 Satyendra Singh 2019-05-26 07:02:19 UTC
Created attachment 1573540 [details]
File: namespaces

Comment 7 Satyendra Singh 2019-05-26 07:02:21 UTC
Created attachment 1573541 [details]
File: open_fds

Comment 8 Mike FABIAN 2019-07-08 09:59:44 UTC
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&gt;, Anish Patil &lt;anish.developer&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&gt;, Anish Patil &lt;anish.developer&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???

Comment 9 Mike FABIAN 2019-11-12 08:56:08 UTC

*** This bug has been marked as a duplicate of bug 1770072 ***

Comment 10 Fedora Update System 2019-11-25 10:07:32 UTC
FEDORA-2019-6398f828eb has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6398f828eb

Comment 11 Fedora Update System 2019-11-25 10:08:01 UTC
FEDORA-2019-8eb6c00da1 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8eb6c00da1

Comment 12 Fedora Update System 2019-11-25 10:08:42 UTC
FEDORA-2019-41b9e70195 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-41b9e70195

Comment 13 Fedora Update System 2019-11-26 16:32:27 UTC
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

Comment 14 Fedora Update System 2019-11-27 00:31:46 UTC
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

Comment 15 Fedora Update System 2019-11-27 01:07:20 UTC
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

Comment 16 Fedora Update System 2019-12-05 01:10:35 UTC
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.

Comment 17 Fedora Update System 2019-12-05 01:39:39 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.