rbash88 / pyffmpeg

Automatically exported from code.google.com/p/pyffmpeg
0 stars 0 forks source link

AttributeError: 'module' object has no attribute 'VideoStream' #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Post installation
2. First test run
3. in python from command line (as given on site)

What is the expected output? What do you see instead?

AttributeError: 'module' object has no attribute 'VideoStream'

What version of the product are you using? On what operating system?

checked out from repository latest

Please provide any additional information below.

Original issue reported on code.google.com by hs.sandh...@gmail.com on 30 Jun 2009 at 3:15

GoogleCodeExporter commented 8 years ago
Which version and OS do you use  ? 

Original comment by sebastien.campion@gmail.com on 3 Jul 2009 at 9:45

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
the version is the latest one downloaded from svn 

: svn checkout http://pyffmpeg.googlecode.com/svn/trunk/ pyffmpeg-read-only

The OS : 

GNU/Linux Fedora release 8 

Arch : 

x86_64 x86_64 x86_64

Original comment by hs.sandh...@gmail.com on 3 Jul 2009 at 10:06

GoogleCodeExporter commented 8 years ago
Hmm, obviously we miss information on why it was not working.
Can you try to run python -v and to provide a trace of the imported modules,
as well as a log of what happened during the setup.py.

Can you try the new version of pyffmpeg ?

Original comment by bertrand...@gmail.com on 8 Jan 2010 at 3:42

GoogleCodeExporter commented 8 years ago
I'm getting this error too with the latest svn.

Original comment by in.incog...@gmail.com on 11 Jan 2010 at 1:46

GoogleCodeExporter commented 8 years ago
Refering to Issue 16,

This probably may be to the fact that you are trying to do the import from the
directory that contains
your import to "pyffmpeg".

The directory from which you are running python must not contain any of the 
following
"file" or "directory/file" :
  pyffmpeg/__init__.py 
  pyffmpeg/__init__.pyo
  pyffmpeg/__init__.pyc
  pyffmpeg.py
  pyffmpeg.pyo
  pyffmpeg.pyc
  pyffmpeg.so (if different from the one you want to work with !)

Once imported you may check the available symbols by doing :

import pyffmpeg
dir(pyffmpeg)

If you are in the wrong case it will return something like this :
  ['__builtins__', '__doc__', '__file__', '__name__', '__path__']

And you can then check at pyffmpeg.__path__ or pyffmpeg.__file__ to see that are
different 
from your system pyffmpeg.

A valid install will return you something like this :
>>> import pyffmpeg
>>> dir(pyffmpeg)
['AFFMpegReader', 'AVCODEC_MAX_AUDIO_FRAME_SIZE', 'AudioPacketDecoder', 
'AudioQueue',
'AudioTrack', 'FFMpegReader', 'Image', 'OUTPUTMODE_NUMPY', 'OUTPUTMODE_PIL', 
'PIL',
'PixelFormats', 'PyArray_DATA_content', 'PyArray_DATA_content_buffer', 
'Queue_Empty',
'Queue_Full', 'TS_AUDIO', 'TS_AUDIOVIDEO', 'TS_VIDEO', 'TS_VIDEO_PIL', 'Track',
'VideoStream', 'VideoTrack', '__builtins__', '__doc__', '__file__', '__name__',
'numpy', 'numpyarr_at', 'py_av_register_all', 'rwbuffer_at', 'sys', 'traceback']
>>> pyffmpeg.__file__
'/usr/lib/python2.5/site-packages/pyffmpeg.so'

Original comment by bertrand...@gmail.com on 11 Jan 2010 at 1:57

GoogleCodeExporter commented 8 years ago
Yeah i tried it in a directory outside of pyffmpeg.

I still get the message.

stream = pyffmpeg.VideoStream()
AttributeError: 'module' object has no attribute 'VideoStream'

Original comment by in.incog...@gmail.com on 11 Jan 2010 at 2:10

GoogleCodeExporter commented 8 years ago
Ok, 

Please tell us what the content of "dir(pyffmpeg)" on your system.

What does "pyffmpeg.__file__" return on your system ?

Maybe also:

import os
os.listdir(os.path.dirpath(pyffmpeg.__file__))

Original comment by bertrand...@gmail.com on 11 Jan 2010 at 2:22

GoogleCodeExporter commented 8 years ago
"dir(pyffmpeg)" gives:

['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__']

os.listdir(os.path.dirpath(pyffmpeg.__file__)) gives

AttributeError: 'module' object has no attribute 'dirpath'

Original comment by in.incog...@gmail.com on 11 Jan 2010 at 2:52

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Ok just to make sure that directory wasn't doing anything I deleted the pyffmpeg
directory and now I get the old error back:

ImportError: /usr/local/lib/python2.6/dist-packages/pyffmpeg.so: undefined 
symbol:
av_reduce

Original comment by in.incog...@gmail.com on 11 Jan 2010 at 2:56

GoogleCodeExporter commented 8 years ago
Ok, good. 

Go back to issue 16 and give me the complete output of your 
"nm" commands.

Original comment by bertrand...@gmail.com on 11 Jan 2010 at 3:17

GoogleCodeExporter commented 8 years ago
what am I nm'ing? the sources/build directory from svn is deleted.

nm /usr/local/lib/python2.6/dist-packages/pyffmpeg.so|grep av_reduce
         U av_reduce

Original comment by in.incog...@gmail.com on 11 Jan 2010 at 5:29

GoogleCodeExporter commented 8 years ago
I switched back to the issue 16 thread. Check my reply there.

Original comment by bertrand...@gmail.com on 11 Jan 2010 at 5:57