GithubHelp home page GithubHelp logo

intuos4-oled's People

Contributors

nekohayo avatar sanette avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

intuos4-oled's Issues

impossible to install with last Ubuntu 20.04

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 ?

Setting text for buttons is broken in python 3.10

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])

Can't start script with Intuos4

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.