-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error when execute my python file #1
Comments
i tried sudo python "your_script_name.py" may work |
I'm experiencing the exact same error and I can confirm using sudo did not solve the issue. |
Can you attach your omxplayer.log? |
I had the same issue. I wrote about a really quick fix at http://www.raspberrypi.org/phpBB3/viewtopic.php?p=240543&sid=02f907f63638cfff6abd91b18a3fc363#p240543. The pyomxplayer code expects certain lines to contain certain properties, but omxplayer may have changed what properties it prints and in what order since pyomxplayer was written. So for the video thing -- the build of omxplayer I'm using right now actually prints aspect properties, not video properties on the second line, so as a quick fix I added aspect_props = self._process.readline() before the line video_props = self._VIDEOPROP_REXP.match(self._process.readline()).groups() |
The same error can occur when omxplayer reports the profile of the video as a negative number. I fixed this by changing the regular expression for the video info slightly. Instead of _VIDEOPROP_REXP = re.compile(r".Video codec ([\w-]+) width (\d+) height (\d+) profile (\d+) fps ([\d.]+).") I now have _VIDEOPROP_REXP = re.compile(r".Video codec ([\w-]+) width (\d+) height (\d+) profile ([\d-]+) fps ([\d.]+).") |
Hello, I got below error messages when I was running python in terminal.
Hope you guys fix this issue. Thanks. |
Hi there, What I did is:
That is it, I hope it will help you. Don't forget to reinstall the python module after you edit code sudo python setup.py install regards, |
Hello Dhafar, I followed your steps, but still get error.
modified file below
self._VIDEOPROP_REXP.match(self._process.readline()).groups()
BR 2013/6/15 Dhafar notifications@github.com
|
If you're still having trouble, I've forked and it's working for me using 2013-05-25-wheezy-raspbian (not exactly sure which version of omxplayer this is using--it doesn't print version info). I also added a finished property to make it easier to check whether a file played to completion. https://github.com/andyjagoe/pyomxplayer/blob/master/pyomxplayer.py |
this is error when i write in console: python videoplayer.py
File "videoplayer.py", line 3, in
omx = OMXPlayer('/home/pi/Desktop/condivisa/basagliasx/menu.mp4')
File "/home/pi/Desktop/condivisa/pyomxplayer-2/pyomxplayer.py", line 35, in init
video_props = self._VIDEOPROP_REXP.match(self._process.readline()).groups()
AttributeError: 'NoneType' object has no attribute 'groups'
The text was updated successfully, but these errors were encountered: