Bug 52983 - Win7 32-bit: Fail to run python codes with gstreamer sdk python binding
Summary: Win7 32-bit: Fail to run python codes with gstreamer sdk python binding
Alias: None
Product: GStreamer SDK
Classification: Unclassified
Component: Windows SDK Distribution (show other bugs)
Version: 2012.7
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: bugs
QA Contact:
Depends on:
Reported: 2012-07-31 00:51 UTC by Rafael
Modified: 2012-08-22 14:48 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

libpyglib-2.0-python.pyd (x86) (111.18 KB, application/octet-stream)
2012-07-31 09:24 UTC, Andoni Morales Alastruey
libpyglib-2.0-python.pyd (x86_64) (138.79 KB, application/octet-stream)
2012-08-22 14:02 UTC, Andoni Morales Alastruey

Description Rafael 2012-07-31 00:51:20 UTC
Win7 32bit
Python 2.7.3
Gstreamer SDK 2012.7

Environment variables added:
GSTREAMER_SDK_ROOT_X86: D:\gstreamer-sdk\0.10\x86\
PYTHONPATH: %GSTREAMER_SDK_ROOT_X86%\lib\python2.7\site-packages

Gstreamer SDK tutorial builds ok and runs ok.
But when run my python codes(which runs ok on Ubuntu 10.04 LTS), it always fails and shows:

Traceback (most recent call last):
  File "justplayer.py", line 7, in <module>
    import gst
  File "d:/gstreamer-sdk/0.10/x86/lib/python2.7/site-packages/gst-0.10\gst\__ini
t__.py", line 193, in <module>
    from _gst import *
ImportError: could not import gobject (error was: 'DLL load failed: The specifie
d module could not be found.')
Comment 1 Rafael 2012-07-31 01:14:55 UTC
Besides, I have to modify the file:
_pygst_dir = 'c:/gstreamer-sdk/0.10/x86/lib/python2.7/site-packages/gst-0.10'
_pygst_dir = 'd:/gstreamer-sdk/0.10/x86/lib/python2.7/site-packages/gst-0.10'

Otherwise, the python codes will fail with following error:

Traceback (most recent call last):
  File "justplayer.py", line 7, in <module>
    import gst
ImportError: No module named gst
Comment 2 Rafael 2012-07-31 02:47:49 UTC
I found probably libpyglib-2.0-python.pyd is missing
Comment 3 Andoni Morales Alastruey 2012-07-31 08:26:29 UTC
I though we already make pygstdir a relative path to allow relocations at some point. I will investigate further to check where we lost this change.
Regarding the import issue, are you importing it like:

import pygst
import gst
Comment 4 Andoni Morales Alastruey 2012-07-31 08:32:44 UTC
I'm able to reproduce the issue. I'll try to fix as soon as possible
Comment 5 Rafael 2012-07-31 08:34:33 UTC
Yes, I import it using 
import pygst
import gst
Comment 6 Andoni Morales Alastruey 2012-07-31 09:16:25 UTC
(In reply to comment #4)
> I'm able to reproduce the issue. I'll try to fix as soon as possible

It's working for me, it just that I wasn't setting the correct PATH :)

Can you please confirm that the file
$GSTREAMER_SDK_ROOT_X86/bin/libpyglib-2.0-python.pyd exists?
Can you import gobject with "import gobject"?
Comment 7 Andoni Morales Alastruey 2012-07-31 09:24:24 UTC
Created attachment 64985 [details]
libpyglib-2.0-python.pyd (x86)
Comment 8 Andoni Morales Alastruey 2012-07-31 09:25:18 UTC
Apparently the file was not packaged properly due to the 'pyd' extension. I attach it here so that you can test it.
Comment 9 Rafael 2012-07-31 12:41:30 UTC
Yes, the libpyglib-2.0-python.pyd does not exist. After adding it to $GSTREAMER_SDK_ROOT_X86/bin/, the python code runs ok.
Thanks Andoni. Should I change bug status?
Comment 10 Andoni Morales Alastruey 2012-07-31 12:46:43 UTC
I'll leave it opened until I fix it's properly fixed in cerbero :)
Comment 11 Andoni Morales Alastruey 2012-08-06 10:15:24 UTC
commit ced530a4bc487c20fa9a4b13ee3a19642a927e91
Author: Andoni Morales Alastruey <ylatuya@gmail.com>
Date:   Wed Aug 1 11:55:37 2012 +0200

    pygobject: add missing category for the main library in windows
    Fixes #52983
Comment 12 Ben R 2012-08-21 14:25:14 UTC
I am experiencing the same issue with the 64bit GStreamer SDK. As there has been no new release yet, could someone attach the 64bit version of the libpyglib-2.0-python.pyd file?

I would be greatful. :-)
Comment 13 Andoni Morales Alastruey 2012-08-22 14:02:40 UTC
Created attachment 65957 [details]
libpyglib-2.0-python.pyd (x86_64)

We will make a new release in the next with this issue fixed among others, but meanwhile I attach the 64bits version of the missing library too.
Comment 14 Ben R 2012-08-22 14:48:15 UTC

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.