plugin.video.iptv.recorder icon indicating copy to clipboard operation
plugin.video.iptv.recorder copied to clipboard

`NoneType` object has no attribute 'read'

Open mzakes opened this issue 6 years ago • 3 comments

Hi,

thanks for all the work. Plugin crashes somewhere around https://github.com/primaeval/plugin.video.iptv.recorder/blob/ba14edd7e0610207bf5fd1fcb6fa8f22e7066335/main.py#L706 with error NoneType object has no attribute 'read'.

Plugin version 0.0.101 ffmpeg from here https://github.com/Khang-NT/ffmpeg-binary-android Kodi 18.1 Android 8

mzakes avatar Feb 23 '19 22:02 mzakes

If you turn on "Settings \ Debug \ Debug ffmpeg stdout/stderr" it should redirect to files in "userdata\addon_data\plugin.video.iptv.recorder\jobs". See if ffmpeg manages to write anything in those.

primaeval avatar Feb 24 '19 07:02 primaeval

thanks for pointing me out to the issue. Actually, I had the Debug ffmpeg stdout/stderr on yesterday, and the crash appeared with it being enabled. After turning it off works like a charm!

mzakes avatar Feb 24 '19 08:02 mzakes

Hello, I want to add additional informations on this problem: The error described in the first post, occurs in the kodi.log when ffmpeg process it's terminated with a problem. I investigated it, and I discovered that ffmpeg have some kind of problem itself when you try to pipe the output to STDOUT. In particular seems that (and it occurs only with some streaming URLs, not for everyone, and occurs only when ppiping is enabled) when ffmpeg start to piping the output to STDOUT, after few seconds some errors occurs, in my case: av_interleaved_write_frame(): Invalid argument Error writing trailer of pipe:: Invalid argument The result is that the error NoneType object has no attribute 'read' occurs in kodi.log, and that the video isn't playable from the recordings because it's empty.

The solution, as already described by @primaeval ,is to disable the piping to STDOUT: kodi_DWOoKlRvp2

P.s.: I haven't enabled the ffmpeg debugging options, so, it seems that the piping to STDOUT was enabled by default

0xbadb0d00 avatar Dec 04 '20 16:12 0xbadb0d00