Thread: [cgkit-user] RuntimeError: Could not open Wintab device context
Brought to you by:
mbaas
From: Christian O'R. <chr...@po...> - 2010-05-12 22:17:23
|
Hi, I'm trying to use the wintab wrapper and it always failed at the opening of the context with the error message "RuntimeError: Could not open Wintab device context". For example, the following code : import pygame from cgkit import wintab from cgkit.wintab.constants import * pygame.init() screen = pygame.display.set_mode((0, 0))#, pygame.FULLSCREEN) hwnd = pygame.display.get_wm_info()['window'] context = wintab.Context() context.pktdata = ( PK_X | PK_Y | PK_NORMAL_PRESSURE | PK_TIME | PK_SERIAL_NUMBER ) context.open(hwnd, True) does generate the specified error at execution of the line "context.open(hwnd, True)". Looking at the code of py_wintab.cpp, it looks like this happening because like the WTOpen(...) call return 0. Does anyone have an idea how I could efficiently troubleshoot the source of my problem? Christian |
From: Matthias B. <mat...@gm...> - 2010-05-13 23:21:25
|
Christian O'Reilly wrote: > I'm trying to use the wintab wrapper and it always failed at the > opening of the context with the error message "RuntimeError: Could not > open Wintab device context". For example, the following code : > > import pygame > > from cgkit import wintab > from cgkit.wintab.constants import * > > pygame.init() > screen = pygame.display.set_mode((0, 0))#, pygame.FULLSCREEN) > > hwnd = pygame.display.get_wm_info()['window'] > context = wintab.Context() > context.pktdata = ( PK_X | PK_Y | PK_NORMAL_PRESSURE | PK_TIME | > PK_SERIAL_NUMBER ) > context.open(hwnd, True) > > does generate the specified error at execution of the line > "context.open(hwnd, True)". Looking at the code of py_wintab.cpp, it If I run your code snippet here, I don't get any error. Have you double checked that the tablet driver is actually installed? Does the tablet (and all of its functionality, not just moving the mouse cursor) work in other applications? Cheers, - Matthias - |
From: Christian O'R. <chr...@po...> - 2010-05-15 18:04:21
|
Your intuition was right. There was actually a problem with the driver and only the mouse functionalities were working. I uninstalled the drivers and installed the latest drivers from the Wacom web site and now it works. Thank you for the answer. Best regards, Christian 2010/5/13 Matthias Baas <mat...@gm...>: > Christian O'Reilly wrote: >> I'm trying to use the wintab wrapper and it always failed at the >> opening of the context with the error message "RuntimeError: Could not >> open Wintab device context". For example, the following code : >> >> import pygame >> >> from cgkit import wintab >> from cgkit.wintab.constants import * >> >> pygame.init() >> screen = pygame.display.set_mode((0, 0))#, pygame.FULLSCREEN) >> >> hwnd = pygame.display.get_wm_info()['window'] >> context = wintab.Context() >> context.pktdata = ( PK_X | PK_Y | PK_NORMAL_PRESSURE | PK_TIME | >> PK_SERIAL_NUMBER ) >> context.open(hwnd, True) >> >> does generate the specified error at execution of the line >> "context.open(hwnd, True)". Looking at the code of py_wintab.cpp, it > > If I run your code snippet here, I don't get any error. > Have you double checked that the tablet driver is actually installed? > Does the tablet (and all of its functionality, not just moving the mouse > cursor) work in other applications? > > Cheers, > > - Matthias - > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cgkit-user mailing list > cgk...@li... > https://lists.sourceforge.net/lists/listinfo/cgkit-user > -- Christian O’Reilly Étudiant au doctorat en génie biomédical Laboratoire Scribens École Polytechnique de Montréal |