tb2097 / wacom-gui

Python/PyQt Wacom GUI for KDE
GNU General Public License v3.0
134 stars 36 forks source link

PTH-660 - GUI Not loading #25

Open lesphinks opened 5 years ago

lesphinks commented 5 years ago

All our "older" tablets work with wacom-gui (0.3.0-rc13) Unfortunately the latest PTH-660 tablet works at the OS level (xsetwacom 0.36.1) but I can't get your wacom-gui to load.

Error: Traceback (most recent call last): File ”/usr/local/wacom-gui/wacom-gui.py”, line 15, in <module> from pad import Pad, Touch File ”/usr/local/wacom-gui/pad.py”, line 10, in <module> from hotkeys import HotkeyWidget File ”/usr/local/wacom-gui/hotkeys.py”, line 17, in <module> class Hotkey(QObject): NameError: name ’QObject’ is not defined

Thank you

tb2097 commented 5 years ago

Issue is with a naming inconsistency between xsetwacom and libwacom. I've created a new release with a hack workaround, as well as a ticket to hopefully have them resolve the issue in the future. Please test/verify. https://github.com/linuxwacom/xf86-input-wacom/issues/47

jcpearson commented 4 years ago

Just started looking at the 0.3.0 release (latest download from github) - and immediately had problems with a PTH-660 on CentOS 7.6 - needed the following patch to get it to work:

--- ./wacom-gui/wacom_data.py.dist      2019-11-19 17:48:29.000000000 +0000
+++ ./wacom-gui/wacom_data.py   2020-01-06 11:23:57.591584315 +0000
@@ -78,7 +78,7 @@ class Tablets:
                 if dev_type == 'Wacom Express Key Remote':
                     dev_type = 'Wacom ExpressKey Remote'
                 # PTH-660/PTH-860 hack
-                if dev_type == 'Wacom Intuos Pro':
+                if dev_type.startswith('Wacom Intuos Pro'):
                     if dev_type not in self.device_data.keys():
                         dev_type = dev_type.replace("Pro", "Pro 2")
                 devID = self.device_data[dev_type]['devID']
tb2097 commented 4 years ago

Were you using just the git pull vs/ the RPM? I did not put a hard requirement to install the newer release of libwacom, but as noted above the issue is related to inconsistent data between the driver and libwacom-data. If you use the RPM I have packed in the updated libwacom-data files.

jcpearson commented 4 years ago

I was using the git download ...

tb2097 commented 4 years ago

Please make sure you are using libwacom-data-0.33 - I have not done testing with the 0.99+ releases, so I can't verify if anything and changed/broke since those updated.

jcpearson commented 4 years ago

I'm a bit confused about the RPM install - if I install wacom-gui-0.3.0-rc17.noarch.rpm, I still get the same issue - i.e.

'Device information for "Wacom Intuos Pro M" not found.'

The 'intuos-pro-2-m.tablet' file (/usr/local/wacom-gui/data/intuos-pro-2-m.tablet) provided by the above RPM is identical to the file provided by the standard libwacom-data RPM (/usr/share/libwacom/intuos-pro-2-m.tablet)

However, if I do replace the /usr/local/wacom-gui/data/ files with those from libwacom-data-0.33, then it finds the tablet OK ...

lindsayschm commented 4 years ago

Hey y'all. So i started working on this today and have spent several hours banging my head against the wall over this. i have the PTH-660. xsetwacom recognizes it. The current version of libwacom-data has the correct naming, and said name matches xsetwacom. However, it seems that for some reason wacom-gui isn't finding the correct one, like it's pulling from something other than the installed libwacom, or if it is, it's still not working properly. i'm using the latest release, and have tried both the rpm and the source. i am on Ubuntu Studio so maybe like, this isn't gonna work period, but it seems like it's firing up just fine except that it's throwing the "Device information for [PTH-660] not found." i tried using libwacom-data-0.33, and it gave no luck either. Help??

tb2097 commented 4 years ago

This may be due to a hack that was put in place in the code due to inconsistencies in libwacom-data previously... Can you please give me the output from the commands: libwacom-list-local-devices and xsetwacom --list devices

If it is the hack, please try commenting out lines 81 - 83 in wacom_data.py and try again. I'll need to remove the hack; currently trying to make a less painful way to support Python 3/PyQt5 in parallel with the current Python 2/PyQt4 build.

lindsayschm commented 4 years ago

Alright, let's see here.

libwacom-list-local-devices
# Device node: /dev/input/event19
[Device]
Name=Wacom Intuos Pro M
ModelName=PTH-660
DeviceMatch=usb:056a:0357;bluetooth:056a:0360;
Class=Intuos5
Width=9
Height=6
IntegratedIn=
Layout=intuos-pro-2-m.svg
Styli=0x842;0x84a;0x80842;0x100802;0x100804;0x10080a;0x10080c;0x100842;0x10084a;0x100902;0x10090a;0x120802;0x140802;0x14080a;0x160802;0x16080a;

[Features]
Reversible=true
Stylus=true
Ring=true
Ring2=false
Touch=true
TouchSwitch=false
StatusLEDs=Ring;
NumStrips=0
Buttons=9

[Buttons]
Left=A;B;C;D;E;F;G;H;I;
# Right=
# Top=
# Bottom=
# Touchstrip=
# Touchstrip2=
# OLEDs=
Ring=I;
# Ring2=
EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107;0x108;
RingNumModes=4
Ring2NumModes=0
StripsNumModes=0

---------------------------------------------------------------
# Device node: /dev/input/event18
[Device]
Name=Wacom Intuos Pro M
ModelName=PTH-660
DeviceMatch=usb:056a:0357;bluetooth:056a:0360;
Class=Intuos5
Width=9
Height=6
IntegratedIn=
Layout=intuos-pro-2-m.svg
Styli=0x842;0x84a;0x80842;0x100802;0x100804;0x10080a;0x10080c;0x100842;0x10084a;0x100902;0x10090a;0x120802;0x140802;0x14080a;0x160802;0x16080a;

[Features]
Reversible=true
Stylus=true
Ring=true
Ring2=false
Touch=true
TouchSwitch=false
StatusLEDs=Ring;
NumStrips=0
Buttons=9

[Buttons]
Left=A;B;C;D;E;F;G;H;I;
# Right=
# Top=
# Bottom=
# Touchstrip=
# Touchstrip2=
# OLEDs=
Ring=I;
# Ring2=
EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107;0x108;
RingNumModes=4
Ring2NumModes=0
StripsNumModes=0

---------------------------------------------------------------
# Device node: /dev/input/event17
[Device]
Name=Wacom Intuos Pro M
ModelName=PTH-660
DeviceMatch=usb:056a:0357;bluetooth:056a:0360;
Class=Intuos5
Width=9
Height=6
IntegratedIn=
Layout=intuos-pro-2-m.svg
Styli=0x842;0x84a;0x80842;0x100802;0x100804;0x10080a;0x10080c;0x100842;0x10084a;0x100902;0x10090a;0x120802;0x140802;0x14080a;0x160802;0x16080a;

[Features]
Reversible=true
Stylus=true
Ring=true
Ring2=false
Touch=true
TouchSwitch=false
StatusLEDs=Ring;
NumStrips=0
Buttons=9

[Buttons]
Left=A;B;C;D;E;F;G;H;I;
# Right=
# Top=
# Bottom=
# Touchstrip=
# Touchstrip2=
# OLEDs=
Ring=I;
# Ring2=
EvdevCodes=0x100;0x101;0x102;0x103;0x104;0x105;0x106;0x107;0x108;
RingNumModes=4
Ring2NumModes=0
StripsNumModes=0
xsetwacom --list devices
Wacom Intuos Pro M Pen stylus       id: 14  type: STYLUS    
Wacom Intuos Pro M Pen eraser       id: 15  type: ERASER    
Wacom Intuos Pro M Pen cursor       id: 16  type: CURSOR    
Wacom Intuos Pro M Pad pad          id: 17  type: PAD       
Wacom Intuos Pro M Finger touch     id: 18  type: TOUCH

Commenting out the hack did not allow it to succeed, unfortunately. Still throwing the same error.

lindsayschm commented 4 years ago

Ooookay so! .... i messed up. Apparently i did not have pyqt4 on my computer before this point, and i'm currently failing at running stuff through that module. So... that may fix some of the problems. i don't know. Do you have an instructions link for running it up via pyqt4?

tb2097 commented 4 years ago

Greetings @lindsayschm Apologies for the delayed response; work has been a bit crazy so I haven't had time to look further at this.

A few quick questions, as I do not have an Ubuntu Studio setup I can test with. 1) Are you using python 2.7.x? If you are running python 3.x, I don't have it working myself... I have been doing some dev to try and make a use case where python 2.7/3 development can go smoothly with as few patches as possible, but I'm still hitting some snags. If you want to try Python 3/PyQt5, Someone has made a fork that does load but I can't verify if there are any issues that come up... The python/PyQt update isn't as smooth as I'd like. You can try it by cloning from here:

https://github.com/battlesnake/wacom-gui/network

2) You should be able to install pyqt4 on ubuntu with apt-get install python-qt4 if it isn't installed.

3) If the above is the case but you have the UI load without seeing the tablet, please try modifying the code in wacom-data.py on lines 81-83, as it was a hack due to inconsistency with earlier versions of libwacom-data.

ochoadavid commented 4 years ago

Hi everyone.

I was having "Device Information for [] not found" problem. I think that the problem is in line 121: elif 'Name=' in line: As libwacom-list-local-devices has a "Name=" line and a "ModelName=".

I managed to get it working changing the line to: elif 'Name=' in line and not 'Model' in line:

¿Could someone else try this fix?

Now I'm having another problem... but I'm gonna open another issue about that.

David

tb2097 commented 4 years ago

I won't be able to test this for a bit as my tablet is in the office and I am unable to get in and I'd prefer not commit code changes until I get there. You could also change the link to elif line.startswith("Name="):, which would probably be the cleaner method. I didn't encounter issues with the ModelName previously but if its resolves it, there are several tickets mentioning issues with the tablet being detected but not loading.

tb2097 commented 3 years ago

Please try using the latest release: https://github.com/tb2097/wacom-gui/releases/tag/v0.3.0-rc18, let me know if this resolves the issue.