Mailing List Archive

mhegepgsnoop problem
Running python 2.7.9 on Debian Jessie and the last 3 nights I've had the
following problem (presumably data related).

Traceback (most recent call last):
File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1611, in <module>
main()
File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 772, in main
download2(the_pid, datablocks, module_numbers, dmxfd, demux_filter)
File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1147, in download2
buffer.extend(dmxfd.read(3))
IOError: [Errno 75] Value too large for defined data type

Anyone any ideas?

--
Robin Gilks




_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: mhegepgsnoop problem [ In reply to ]
On 06/09/15 09:56, Robin Gilks wrote:
> Running python 2.7.9 on Debian Jessie and the last 3 nights I've had the
> following problem (presumably data related).
>
> Traceback (most recent call last):
> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1611, in <module>
> main()
> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 772, in main
> download2(the_pid, datablocks, module_numbers, dmxfd, demux_filter)
> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1147, in download2
> buffer.extend(dmxfd.read(3))
> IOError: [Errno 75] Value too large for defined data type
>
> Anyone any ideas?
>
That's odd. It looks like the read from the dmxfd file descriptor is
failing in the line

buffer.extend(dmxfd.read(3))

I don't understand why. This should simply read three bytes and put them
in the buffer. It is an I/O error so maybe the dmxfd file descriptor is
not opened properly and the code is attempting to read 3 bytes from an
object which is less than 3 bytes in size? Maybe insert a "print
sys.getsizeof(dmxfd)" statement to see what size it is?

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: mhegepgsnoop problem [ In reply to ]
> On 06/09/15 09:56, Robin Gilks wrote:
>> Running python 2.7.9 on Debian Jessie and the last 3 nights I've had the
>> following problem (presumably data related).
>>
>> Traceback (most recent call last):
>> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1611, in <module>
>> main()
>> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 772, in main
>> download2(the_pid, datablocks, module_numbers, dmxfd, demux_filter)
>> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1147, in download2
>> buffer.extend(dmxfd.read(3))
>> IOError: [Errno 75] Value too large for defined data type
>>
>> Anyone any ideas?
>>
> That's odd. It looks like the read from the dmxfd file descriptor is
> failing in the line
>
> buffer.extend(dmxfd.read(3))
>
> I don't understand why. This should simply read three bytes and put them
> in the buffer. It is an I/O error so maybe the dmxfd file descriptor is
> not opened properly and the code is attempting to read 3 bytes from an
> object which is less than 3 bytes in size? Maybe insert a "print
> sys.getsizeof(dmxfd)" statement to see what size it is?
>

I put the print statement before the line in question and it reports (a
total of 138 times) 144.

Does this help?




--
Robin Gilks



_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: mhegepgsnoop problem [ In reply to ]
>
>> On 06/09/15 09:56, Robin Gilks wrote:
>>> Running python 2.7.9 on Debian Jessie and the last 3 nights I've had
>>> the
>>> following problem (presumably data related).
>>>
>>> Traceback (most recent call last):
>>> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1611, in <module>
>>> main()
>>> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 772, in main
>>> download2(the_pid, datablocks, module_numbers, dmxfd,
>>> demux_filter)
>>> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1147, in download2
>>> buffer.extend(dmxfd.read(3))
>>> IOError: [Errno 75] Value too large for defined data type
>>>
>>> Anyone any ideas?
>>>
>> That's odd. It looks like the read from the dmxfd file descriptor is
>> failing in the line
>>
>> buffer.extend(dmxfd.read(3))
>>
>> I don't understand why. This should simply read three bytes and put them
>> in the buffer. It is an I/O error so maybe the dmxfd file descriptor is
>> not opened properly and the code is attempting to read 3 bytes from an
>> object which is less than 3 bytes in size? Maybe insert a "print
>> sys.getsizeof(dmxfd)" statement to see what size it is?
>>
>
> I put the print statement before the line in question and it reports (a
> total of 138 times) 144.
>
> Does this help?
>

This morning I've checked after the overnight run and it all fine again.

Something in the data must have changed!


--
Robin Gilks





_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: mhegepgsnoop problem [ In reply to ]
On Fri, 5 Feb 2016 00:40:46 +1300, you wrote:

>Greetings all
>
>I've seen this problem before but never solved it and now I only have a
>couple of days of scheduling left :(
>
>
>Traceback (most recent call last):
> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1611, in <module>
> main()
> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 772, in main
> download2(the_pid, datablocks, module_numbers, dmxfd, demux_filter)
> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1147, in download2
> buffer.extend(dmxfd.read(3))
>IOError: [Errno 75] Value too large for defined data type
>
>
>No idea what is means (not a python person!!) but presumably data related
>somehow.
>
>Anyone with a fix?

I just downloaded and tried mhegepgsnoop-0.6.1.py and immediately got
an error when I ran a test command (./mhegepgsnoop-0.6.1.py -v -d
/dev/dvb/adapter2/demux0 -T 1001 -p):

Traceback (most recent call last):
File "./mhegepgsnoop-0.6.1.py", line 1611, in <module>
main()
File "./mhegepgsnoop-0.6.1.py", line 734, in main
verbose('\nTuning ' + frontend + ' to channel ' + + (('ID ' +
str(options.tune_chanid)) if options.tune_chanid else
str(options.tune_ch)) + '\n')
TypeError: bad operand type for unary +: 'str'

That seems to be a typo in line 734 - there are two adjacent +
operators. Deleting one of them fixes this.

After that fix, it worked for me in the script I normally use to run
it, using these options:

mhegepgsnoop.py -v -zp -d /dev/dvb/adapter2/demux0 -o /tmp/xmltv.xml

I run dvbtune externally in the script that runs mhegepgsnoop as I
have never been able to get it to work with its own internal tuning
code on my tuners. I probably could now if I used the -e option to
add all the extra options I need for dvbsnoop.

What options are you using on the command line?

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: mhegepgsnoop problem [ In reply to ]
On Thu, 28 Sep 2017 16:04:35 +1300, you wrote:

>I seem to be getting this issue about once in a while and it lasts a week
>because mheg data triggering it is present for that long.
>
>Not being a python person I haven't a clue...
>
>Traceback (most recent call last):
> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1611, in <module>
> main()
> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 772, in main
> download2(the_pid, datablocks, module_numbers, dmxfd, demux_filter)
> File "/usr/local/bin/mhegepgsnoop-0.6.1.py", line 1147, in download2
> buffer.extend(dmxfd.read(3))
>IOError: [Errno 75] Value too large for defined data type

I have had that a few times recently, but for me it does not last. It
usually is gone if I retry later in the evening, or the next day. So
I usually do not notice when it happens as I only use the MHEG5 data
for the channels that are not available in the downloaded data, such
as Te Reo and Bravo +1, and I do not watch those channels much, if
ever. My EPG script just uses yesterday's MHEG5 data if it can not
get today's, so it completes successfully.

When I checked my logs, it happened for me today, just after 15:10
when my EPG script runs from cron. But when I tried again just now,
mhegepgsnoop completed successfully.

From a little googling, this seems like it could be the same sort of
problem as this:

https://stackoverflow.com/questions/4463975/value-too-large-for-defined-data-type

What it looks like is happening is that mhegepgsnoop is not reading
the dmxfd device quickly enough and a buffer overflow is happening in
dmxfd, which then causes the exception when the next read happens. So
I have modified my copy of mhegepgsnoop to try to use a larger buffer
in the open call for dmxfd. Unfortunately, Python does not specify
the default buffer size used - it is just "system default". So I do
not know what the current value is. So I thought I would just try a
decent sized buffer of 1 Mibyte and see if that worked. So I changed
my line 763 from:

dmxfd = open(options.demux_device, 'r')

to:

dmxfd = open(options.demux_device, 'r', 1024*1024)

I did try a buffer size of 4096 and that consistently caused the
error, so I think I am on the right track. I will leave the setting
at 1 Mibyte and see what happens over the next few days.

Note that my mhegepgsnoop.py file has been customised a little from
the mhegepgsnoop-0.6.1.py one, where the open line will be a few lines
earlier than in mine.

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.ourshack.com
https://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/