Bug 1644475 - [abrt] ibus-setup: join(): posixpath.py:80:join:TypeError: expected str, bytes or os.PathLike object, not NoneType
Summary: [abrt] ibus-setup: join(): posixpath.py:80:join:TypeError: expected str, byte...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus
Version: 29
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: fujiwara
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:8ce9f97bbe0d530b3b34b1c08ce...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-31 00:47 UTC by Nikhil Jha
Modified: 2018-11-02 03:25 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-10-31 03:37:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (763 bytes, text/plain)
2018-10-31 00:47 UTC, Nikhil Jha
no flags Details
File: cgroup (346 bytes, text/plain)
2018-10-31 00:47 UTC, Nikhil Jha
no flags Details
File: cpuinfo (1.40 KB, text/plain)
2018-10-31 00:47 UTC, Nikhil Jha
no flags Details
File: environ (1.44 KB, text/plain)
2018-10-31 00:47 UTC, Nikhil Jha
no flags Details
File: mountinfo (3.86 KB, text/plain)
2018-10-31 00:47 UTC, Nikhil Jha
no flags Details
File: namespaces (129 bytes, text/plain)
2018-10-31 00:47 UTC, Nikhil Jha
no flags Details
File: open_fds (1.16 KB, text/plain)
2018-10-31 00:47 UTC, Nikhil Jha
no flags Details

Description Nikhil Jha 2018-10-31 00:47:36 UTC
Description of problem:
Installed ibus, ran ibus-config (but ibus-config uses the current python, not the system python like it should) 

so I ran it with system python with

/usr/bin/python3 /usr/share/ibus/setup/main.py

and it crashed.

Version-Release number of selected component:
ibus-setup-1.5.19-4.fc29

Additional info:
reporter:       libreport-2.9.6
cmdline:        /usr/bin/python3 /usr/share/ibus/setup/main.py
crash_function: join
exception_type: TypeError
executable:     /usr/share/ibus/setup/main.py
interpreter:    python3-3.7.1-1.fc29.x86_64
kernel:         4.18.16-300.fc29.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
posixpath.py:80:join:TypeError: expected str, bytes or os.PathLike object, not NoneType

Traceback (most recent call last):
  File "/usr/share/ibus/setup/main.py", line 698, in <module>
    setup = Setup()
  File "/usr/share/ibus/setup/main.py", line 115, in __init__
    self.__init_ui()
  File "/usr/share/ibus/setup/main.py", line 404, in __init_ui
    self.__checkbutton_auto_start.set_active(self.__is_auto_start())
  File "/usr/share/ibus/setup/main.py", line 654, in __is_auto_start
    "share/applications/ibus.desktop")
  File "/usr/lib64/python3.7/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Local variables in innermost frame:
a: None
p: ('share/applications/ibus.desktop',)

Comment 1 Nikhil Jha 2018-10-31 00:47:40 UTC
Created attachment 1499159 [details]
File: backtrace

Comment 2 Nikhil Jha 2018-10-31 00:47:41 UTC
Created attachment 1499160 [details]
File: cgroup

Comment 3 Nikhil Jha 2018-10-31 00:47:42 UTC
Created attachment 1499161 [details]
File: cpuinfo

Comment 4 Nikhil Jha 2018-10-31 00:47:43 UTC
Created attachment 1499162 [details]
File: environ

Comment 5 Nikhil Jha 2018-10-31 00:47:44 UTC
Created attachment 1499163 [details]
File: mountinfo

Comment 6 Nikhil Jha 2018-10-31 00:47:45 UTC
Created attachment 1499164 [details]
File: namespaces

Comment 7 Nikhil Jha 2018-10-31 00:47:46 UTC
Created attachment 1499165 [details]
File: open_fds

Comment 8 Nikhil Jha 2018-10-31 01:12:38 UTC
Steps to reproduce:

1. Install a fresh copy of the F28/F29 KDE Spin.
2. Install ibus and ibus-mozc.
3. Run ibus-config.
   -> it crashes

Expected:
It works as described here:
https://fedoraproject.org/wiki/Testcase_ibus_input?rd=QA:Testcase_ibus_input

Comment 9 fujiwara 2018-10-31 03:37:44 UTC
You should run ibus-setup instead.

(In reply to Nikhil Jha from comment #8)
> https://fedoraproject.org/wiki/Testcase_ibus_input?rd=QA:Testcase_ibus_input

That page should not describe that wrong usage and no ibus-config.

Comment 10 Nikhil Jha 2018-10-31 04:48:43 UTC
Oops, I meant run ibus-setup. That's not the issue.

Steps to reproduce:

1. Install a fresh copy of the F28/F29 KDE Spin.
2. Install ibus and ibus-mozc.
3. Run ibus-setup.
   -> it crashes

(In reply to fujiwara from comment #9)
> You should run ibus-setup instead.
> 
> (In reply to Nikhil Jha from comment #8)
> > https://fedoraproject.org/wiki/Testcase_ibus_input?rd=QA:Testcase_ibus_input
> 
> That page should not describe that wrong usage and no ibus-config.

Comment 11 fujiwara 2018-10-31 06:35:28 UTC
So which error do you get?

(In reply to Nikhil Jha from comment #0)
> cmdline:        /usr/bin/python3 /usr/share/ibus/setup/main.py

>   File "/usr/share/ibus/setup/main.py", line 654, in __is_auto_start
>     "share/applications/ibus.desktop")
>   File "/usr/lib64/python3.7/posixpath.py", line 80, in join
>     a = os.fspath(a)


This error can happen when you run `python3 /usr/share/ibus/setup/main.py` directly but not `/usr/bin/ibus-setup`.

Can you paste the output of `sh -x /usr/bin/ibus-setup` ?

Comment 12 Nikhil Jha 2018-10-31 14:27:30 UTC
$ sh -x /usr/bin/ibus-setup
+ prefix=/usr
+ libexecdir=/usr/libexec
+ export IBUS_PREFIX=/usr
+ IBUS_PREFIX=/usr
+ export IBUS_DATAROOTDIR=/usr/share
+ IBUS_DATAROOTDIR=/usr/share
+ export IBUS_LOCALEDIR=/usr/share/locale
+ IBUS_LOCALEDIR=/usr/share/locale
+ export IBUS_LIBEXECDIR=/usr/libexec
+ IBUS_LIBEXECDIR=/usr/libexec
+ exec python3 /usr/share/ibus/setup/main.py
Traceback (most recent call last):
  File "/usr/share/ibus/setup/main.py", line 33, in <module>
    from gi import require_version as gi_require_version
ModuleNotFoundError: No module named 'gi'

Comment 13 fujiwara 2018-11-01 02:01:22 UTC
(In reply to Nikhil Jha from comment #12)
> + exec python3 /usr/share/ibus/setup/main.py
> Traceback (most recent call last):
>   File "/usr/share/ibus/setup/main.py", line 33, in <module>
>     from gi import require_version as gi_require_version
> ModuleNotFoundError: No module named 'gi'

The error is obviously different from the bug description and that's why I closed this bug.

You need to install python3-gobject-base which has the gi module.

Comment 14 Nikhil Jha 2018-11-01 14:29:45 UTC
I have those packages. The issue is that ibus-setup isn't using the python in /usr/bin/python3 or /usr/bin/python like it should, it's using the python I have in my PATH, which is Anaconda Python.

[njha@gram ~]$ sudo dnf install pygobject3 python3-gobject
Last metadata expiration check: 23:12:36 ago on Wed 31 Oct 2018 08:12:28 AM PDT.
Package python2-gobject-3.30.1-1.fc29.x86_64 is already installed.
Package python3-gobject-3.30.1-1.fc29.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[njha@gram ~]$ ibus-setup
Traceback (most recent call last):
  File "/usr/share/ibus/setup/main.py", line 33, in <module>
    from gi import require_version as gi_require_version
ModuleNotFoundError: No module named 'gi'

So I fixed that by running 

/usr/bin/python3 /usr/share/ibus/setup/main.py

The problem that causes the bug in the bug description is the fact that the correct IBUS env variables are not set by default. Once all of those are set, ibus-setup almost works as expected.

Comment 15 fujiwara 2018-11-02 03:25:14 UTC
If you have multiple versions. You need to prioritize the correct path before you run ibus-setup or install another python3-gobject-base with the different version.


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