sanette / intuos4-oled Goto Github PK
View Code? Open in Web Editor NEWsend cool images and text to the Wacom Intuos 4 OLEDs
License: GNU General Public License v3.0
send cool images and text to the Wacom Intuos 4 OLEDs
License: GNU General Public License v3.0
Hi @sanette
I was using your intuos4-oled program with my previous Ubuntu version, the 18.04. It was perfectly working, thanks a lot, great job !
Since few days, I switched to Ubuntu 20.04 and unfortunately, I'm no longer able to install it. Not particular issue during the installation. No error while installing at and pytho-pil, no error while running the install.sh.
However, when I try running the script intuos4oled.py, I always get the message that the file do not exists while the file is there !
Installation completed. You may now plug the Intuos in.
franky@maison:/tmp/intuos4-oled-master$ sudo ./intuos4oled.py init
sudo:
exécution de ./intuos4oled.py impossible: Aucun fichier ou dossier de ce type
Would you have any idea about this issue ?
(reported by [marqsb2])
We could use only /usr/bin/python3 or check for compatibility with python 2
When trying
intuos4oled.py -t 'xxx' -b 2 --font DejaVuSans.ttf set
An error is thrown:
Using Wacom Intuos4 (6x9) (PTK-640)
Active led = 0
Loading datafile /root/.intuos
Sending "xxx" to button 2
Traceback (most recent call last):
File "/usr/local/bin/intuos4oled.py", line 488, in
send_text(args.text, args.button, screen, flip = args.flip,
File "/usr/local/bin/intuos4oled.py", line 407, in send_text
text_to_img(text, filename, font, size, span)
File "/usr/local/bin/intuos4oled.py", line 382, in text_to_img
font_path = get_font_path(font)
File "/usr/local/bin/intuos4oled.py", line 369, in get_font_path
f = [x for x in l if font in x]
File "/usr/local/bin/intuos4oled.py", line 369, in
f = [x for x in l if font in x]
TypeError: a bytes-like object is required, not 'str'
This seems to be due to fc-list subprocess returning a byte array, instead of a str()
By modifying the function responsible, I managed to get this working, but it might be a good idea to resolve it in a more pythonic way.
Python version:
Python 3.10.8 (main, Nov 1 2022, 14:18:21) [GCC 12.2.0] on linux
Kernel:
Linux cerium 5.15.85-1-MANJARO #1 SMP PREEMPT Wed Dec 21 21:15:06 UTC 2022 x86_64 GNU/Linux
Amended line 366:
def get_font_path (font):
# fast and dirty
l = str(subprocess.check_output(["fc-list"]))
# more methodic, unicode approach
l = subprocess.check_output(["fc-list"]).decode("utf-8")
l = l.splitlines()
f = [x for x in l if font in x]
if f == []:
print ("ERROR: font %s not found"%font)
return (None)
return (f[0].split(':')[0])
Hi,
When I'm trying to start the script, I have an error saying this:
raise Exception ("ERROR: no corresponding directory found in %s for device (%04x,%04x)"%(DEVICES_PATH, vendor, product))
Exception: ERROR: no corresponding directory found in /sys/bus/hid/devices/ for device (056a,00b9)
Do you have any idea where it is coming from?
Here is what I get when listing the devices with xsetwacom:
Wacom Intuos4 6x9 stylus id: 14 type: STYLUS
Wacom Intuos4 6x9 eraser id: 15 type: ERASER
Wacom Intuos4 6x9 cursor id: 16 type: CURSOR
Wacom Intuos4 6x9 pad id: 17 type: PAD
I'm using centos7 with Linux 3.10.0-1062.12.1.el7.x86_64
Thanks for the help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.