jbaiter / pyomxplayer

Python wrapper around OMXPlayer for the Raspberry Pi
MIT License
103 stars 61 forks source link

Error - 'NoneType' object has no attribute 'groups' #3

Open ljy396 opened 11 years ago

ljy396 commented 11 years ago

Hello,

I got below error messages when I was running python in terminal. It is similar to #issue 1.

from pyomxplayer import OMXPlayer from pprint import pprint omx = OMXPlayer('/home/pi/1.mp3') Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/pyomxplayer.py", line 32, in init file_props = self._FILEPROP_REXP.match(self._process.readline()).groups() AttributeError: 'NoneType' object has no attribute 'groups'

Hope you guys fix this issue. Thanks.

ljy396 commented 11 years ago

Sorry, Missed some characters. Post again

from pyomxplayer import OMXPlayer from pprint import pprint omx = OMXPlayer('/home/pi/1.mp3') Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/pyomxplayer.py", line 32, in init file_props = self._FILEPROP_REXP.match(self._process.readline()).groups() AttributeError: 'NoneType' object has no attribute 'groups'

leucos commented 10 years ago

File properties are not outputed by omxplayer on some versions. Just comment out the 3 lines below # Get file properties and the 3 lines starting with if self.audio['streams'] > 0:

alfredoivan commented 9 years ago

Hello, jbaiter

I have rpi raspbian #737 , latest omxplayer. And had this problem. Managed to solve it by commenting those lines , and ALSO the audio lines (group error) below.

Now it works almost flawless.

Hope this helps you ,

good work ! Alfredo Martínez Cáceres

PangolinPaw commented 8 years ago

Hello all,

I appreciate this is quite old but I've had similar experiences. leucos's suggestion and the 13 Oct 2015 commit resolved the problem for .mkv files, however .mp4 (while they no longer produce an error) do not play. Any suggestions would be appreciated.