bharadwaj-raju / qOverview

MOVED: https://gitlab.com/bharadwaj-raju/QOverview
https://gitlab.com/bharadwaj-raju/QOverview
GNU General Public License v3.0
47 stars 3 forks source link

qoverview AttributeError: 'NoneType' object has no attribute 'replace' #10

Closed stratus-ss closed 6 years ago

stratus-ss commented 6 years ago

As you suggested in the other issue I went through the process again:

~/temp/qOverview$ sudo ./install.sh --uninstall
Uninstalling...

~/temp/qOverview$ git pull
Already up-to-date.

~/temp/qOverview$ sudo ./install.sh 
/home/user
Installing...
Enabling use of KDE Frameworks...
Patching ui.qml...
Patching qoverview.py...
~/temp/qOverview$ qoverview-config-server 
No icon found for mark-location-symbolic; falling back to missing-icon.svg
No icon found for printer; falling back to missing-icon.svg
No icon found for printer; falling back to missing-icon.svg
No icon found for printer; falling back to missing-icon.svg
No icon found for applications-other; falling back to missing-icon.svg
No icon found for gnome-mpv; falling back to missing-icon.svg
No icon found for obs; falling back to missing-icon.svg

However I am still getting the same error

~/temp/qOverview$ qoverview
KDE Frameworks: Yes
file:///home/user/temp/qOverview/ui.qml:7:1: Unexpected token `' 
     #ifdef KDEPLASMA 
     ^
file:///home/user/temp/qOverview/ui.qml:7:8: Syntax error 
     #ifdef KDEPLASMA 
            ^
7f4fd01a-0dbd-45af-a3f3-63da71359ca6

If I run qoverview from a different location (such as my home dir) I get the following stack:

KDE Frameworks: Yes
file:///usr/lib/qoverview/ui.qml:89: ReferenceError: Python is not defined
file:///usr/lib/qoverview/ui.qml:13: ReferenceError: Python is not defined
file:///usr/lib/qoverview/ui.qml:35: TypeError: Cannot read property '0' of undefined
file:///usr/lib/qoverview/ui.qml:28: ReferenceError: Python is not defined
file:///usr/lib/qoverview/ui.qml:105: ReferenceError: Python is not defined
file:///usr/lib/qoverview/ui.qml:143: ReferenceError: Python is not defined
file:///usr/lib/qoverview/ui.qml:208: ReferenceError: Python is not defined
Traceback (most recent call last):
  File "/usr/bin/qoverview", line 65, in get_background
    return config.get_background()
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/bin/qoverview-config-server", line 468, in get_background
    return _get_background().replace('file://', '')
AttributeError: 'NoneType' object has no attribute 'replace'
Aborted
bharadwaj-raju commented 6 years ago

While qoverview-config-server is running, open the QDBusViewer app (probably already installed on Neon).

Scroll down and select the org.qoverview.config from the list on the left. Then expand the list on the right as shown:

screenshot_20180222_225656

And double-click the Method: get_background.

Report any output (either in the qoverview-config-server output or the QDBusViewer app output (The rectangle that is displaying Connected to DBus. in the screenshot)).

For me, it returns the background image, like this:

screenshot_20180222_225948

stratus-ss commented 6 years ago

Here is the screen shot:

screenshot_20180222_143622

Here is the terminal output:

~/temp$ qoverview-config-server 
No icon found for mark-location-symbolic; falling back to missing-icon.svg
No icon found for printer; falling back to missing-icon.svg
No icon found for printer; falling back to missing-icon.svg
No icon found for printer; falling back to missing-icon.svg
No icon found for applications-other; falling back to missing-icon.svg
No icon found for gnome-mpv; falling back to missing-icon.svg
No icon found for obs; falling back to missing-icon.svg
argh
argh
argh
argh
argh
argh
argh
argh

For reference I had to install qt4-dev-tools to enable qdbusviewer

bharadwaj-raju commented 6 years ago

Try:

$ cd /usr/lib/qoverview
$ python3
>>> confsrv = __import__('config-server')
>>> print(confsrv._get_background())
stratus-ss commented 6 years ago
/usr/lib/qoverview$ python3

Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> confsrv = __import__('config-server')
No icon found for mark-location-symbolic; falling back to missing-icon.svg
No icon found for printer; falling back to missing-icon.svg
No icon found for printer; falling back to missing-icon.svg
No icon found for printer; falling back to missing-icon.svg
No icon found for applications-other; falling back to missing-icon.svg
No icon found for gnome-mpv; falling back to missing-icon.svg
No icon found for obs; falling back to missing-icon.svg
>>> print(confsrv._get_background())
None
bharadwaj-raju commented 6 years ago

Strange. The _get_background() should have detected KDE's background wallpaper…

KDE version? Any multi-monitors with different wallpapers, etc?

stratus-ss commented 6 years ago

So this is on a laptop with the following:

System:    Host: ThinkPad-T450s Kernel: 4.13.0-32-generic x86_64 (64 bit) Desktop: N/A
           Distro: neon 16.04 xenial
Machine:   System: LENOVO (portable) product: 20BWS1KY0Q v: ThinkPad T450s serial: PC08UN7V
           Mobo: LENOVO model: 20BWS1KY0Q serial: L1HF5AE02GE
           Bios: LENOVO v: JBET47WW (1.12 ) date: 03/10/2015
CPU:       Dual core Intel Core i7-5600U (-HT-MCP-) speed/max: 2593/3200 MHz
Graphics:  Card: Intel Broadwell-U Integrated Graphics
           Display Server: X.org 1.19.5 drivers: (unloaded: fbdev,vesa)
           tty size: 110x38 Advanced Data: N/A for root
Network:   Card-1: Intel Ethernet Connection (3) I218-LM driver: e1000e
           Card-2: Intel Wireless 7265 driver: iwlwifi
Drives:    HDD Total Size: 256.1GB (7.8% used)
Info:      Processes: 208 Uptime: 0 min Memory: 805.6/11709.1MB Client: Shell (sudo) inxi: 2.2.35 

This is a fresh install of KDE Neon User addition

DISTRIB_ID=neon
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="KDE neon User Edition 5.12"
NAME="KDE neon"
VERSION="5.12"
ID=neon
ID_LIKE="ubuntu debian"
PRETTY_NAME="KDE neon User Edition 5.12"

screenshot_20180223_102744

bharadwaj-raju commented 6 years ago

Mine is 5.12 too…

Can you please post your ~/.config/plasma-org.kde.plasma.desktop-appletsrc? If it's too long for here, upload it on GitHub Gist.

stratus-ss commented 6 years ago
[ActionPlugins][0]
MidButton;NoModifier=org.kde.paste
RightButton;NoModifier=org.kde.contextmenu
wheel:Vertical;NoModifier=org.kde.switchdesktop

[ActionPlugins][1]
RightButton;NoModifier=org.kde.contextmenu

[Containments][1]
activityId=8ca0f707-c2d5-4a85-abc5-88e48e8e0470
formfactor=0
immutability=1
lastScreen=0
location=0
plugin=org.kde.plasma.folder
wallpaperplugin=org.kde.image

[Containments][1][Applets][26]
immutability=1
plugin=org.kde.plasma.notes

[Containments][1][Applets][26][Configuration][General]
noteId=4db1b2b6-3627-418f-af0b-43fea31a49

[Containments][1][General]
ItemsGeometries=Applet-26:1664,0,256,256,0;
positions=1,17,desktop:/trash.desktop,0,1,desktop:/Home.desktop,0,2
sortMode=-1

[Containments][2]
activityId=
formfactor=2
immutability=1
lastScreen=0
location=4
plugin=org.kde.panel
wallpaperplugin=org.kde.image

[Containments][2][Applets][20]
immutability=1
plugin=org.kde.plasma.systemloadviewer

[Containments][2][Applets][21][Configuration][General]
sources=mem%2Fphysical%2Fapplication,mem%2Fswap%2Fused

[Containments][2][Applets][24][Configuration][General]
length=96

[Containments][2][Applets][3]
immutability=1
plugin=org.kde.plasma.kickoff

[Containments][2][Applets][3][Configuration][General]
favoritesPortedToKAstats=true

[Containments][2][Applets][3][Configuration][Shortcuts]
global=Alt+F1

[Containments][2][Applets][3][Shortcuts]
global=Alt+F1

[Containments][2][Applets][4]
immutability=1
plugin=org.kde.plasma.pager

[Containments][2][Applets][5]
immutability=1
plugin=org.kde.plasma.taskmanager

[Containments][2][Applets][6]
immutability=1
plugin=org.kde.plasma.systemtray

[Containments][2][Applets][6][Configuration]
SystrayContainmentId=7

[Containments][2][Applets][8]
immutability=1
plugin=org.kde.plasma.digitalclock

[Containments][2][ConfigDialog]
DialogHeight=84
DialogWidth=1920

[Containments][2][General]
AppletOrder=3;4;5;6;8;20

[Containments][7]
activityId=
formfactor=2
immutability=1
lastScreen=0
location=4
plugin=org.kde.plasma.private.systemtray
wallpaperplugin=org.kde.image

[Containments][7][Applets][10]
immutability=1
plugin=org.kde.plasma.clipboard

[Containments][7][Applets][11]
immutability=1
plugin=org.kde.plasma.devicenotifier

[Containments][7][Applets][12]
immutability=1
plugin=org.kde.kdeconnect

[Containments][7][Applets][13]
immutability=1
plugin=org.kde.plasma.notifications

[Containments][7][Applets][14]
immutability=1
plugin=org.kde.plasma.printmanager

[Containments][7][Applets][15]
immutability=1
plugin=org.kde.discovernotifier

[Containments][7][Applets][16]
immutability=1
plugin=org.kde.plasma.vault

[Containments][7][Applets][17]
immutability=1
plugin=org.kde.plasma.battery

[Containments][7][Applets][18]
immutability=1
plugin=org.kde.plasma.networkmanagement

[Containments][7][Applets][19]
immutability=1
plugin=org.kde.plasma.bluetooth

[Containments][7][Applets][25]
immutability=1
plugin=org.kde.plasma.mediacontroller

[Containments][7][Applets][9]
immutability=1
plugin=org.kde.plasma.volume

[Containments][7][General]
extraItems=org.kde.plasma.devicenotifier,org.kde.plasma.notifications,org.kde.plasma.networkmanagement,org.kde.kdeconnect,org.kde.plasma.bluetooth,org.kde.plasma.clipboard,org.kde.plasma.printmanager,org.kde.plasma.mediacontroller,org.kde.plasma.volume,org.kde.plasma.vault,org.kde.plasma.battery,org.kde.discovernotifier
knownItems=org.kde.plasma.devicenotifier,org.kde.plasma.notifications,org.kde.plasma.networkmanagement,org.kde.kdeconnect,org.kde.plasma.bluetooth,org.kde.plasma.clipboard,org.kde.plasma.printmanager,org.kde.plasma.mediacontroller,org.kde.plasma.volume,org.kde.plasma.vault,org.kde.plasma.battery,org.kde.discovernotifier

[ScreenMapping]
screenMapping=desktop:/trash.desktop,0,desktop:/Home.desktop,0
bharadwaj-raju commented 6 years ago

Well, your plasma config doesn't have a desktop wallpaper configured!

But surely you have a desktop wallpaper, so why is Plasma not storing it in the config?

stratus-ss commented 6 years ago

Its whatever the default wallpaper is: screenshot_20180223_105613

stratus-ss commented 6 years ago

So you are correct when I just change it to some random wall paper there are no errors and I see an overview

I do have a question however, when i search the overview for dolphin for example, typing dolphin and hitting enter doesn't do anything, i actually have to click on the dolphin icon. Is this expected? Is there anyway to launch the application by hitting enter or is that a design limitation?

bharadwaj-raju commented 6 years ago

I'm closing this, but I'll probably open a bug for this over at KDE.

bharadwaj-raju commented 6 years ago

Also, sorry, I missed your comment about pressing Enter ... I'll need some time to implement it...