I have a project that runs Python 2.7, PyGTK 2.24 and the latest version of PyGST.
I get a weird intermittent error in the following code. At the first longer error, the video will play just fine, and the error will only appear after I close the video window. The second prevents the opening of the window.
import pygtk pygtk.require('2.0') import gtk, pango import pygst pygst.require('0.10') import gst import Trailcrest import os, sys class Video: def __init__(self): def on_message(bus, message): if message.type == gst.MESSAGE_EOS:
The program "Video.py" received an error of the X Window system. This probably reflects a bug in the program. Error: βBadIDChoice (invalid resource identifier selected for this connection) '. (More: serial number 373 error_code 14 request_code 1 minor_code 0) (Note for programmers: usually X errors are reported asynchronously; that is, after an error you will receive a message about to debug your program, run it with the --sync command line switch to change this behavior, then you can get a meaningful return line from your debugger if you break the gdk_x_error () function.)
Quick note about this ... I followed the instructions and ran "python Video.py --sync" on the command line (I'm on Kubuntu), and I got this message "AGAIN."
Here's another mistake - one that generally prevents playback.
python: ../../ src / xcb_io.c: 221: poll_for_event: Assertion `(((long) (event_sequence) - (long) (dpy-> request)) <= 0) 'failed. Canceled
They will literally alternate, although not perfectly. I could get the first three, two second, one first, one second, two first, etc. It is always different.
What is the devil here?
source share