Mailing List Archive

mhegepgsnoop.py and mythfilldatabase not working.
Hi!
I've been trying all morning to get the tv lisings into MythTV. I've got
the latest version of MythTV installed on FC20 and am using
mhegepgsnoop-0.6.0.py.

First of all I made the following chnages to in mhegepgsnoop-0.6.0.py:
1. mysql_args = "-u mythtv -pmythtv"... wouldn't give me access to the
database otherwise.
2. clean_titles = True
clean_titles2 = True .. necessary as otherwise I was getting
"AttributeError: 'Namespace' object has no attribute 'clean_titles2'".

Anyway, after doing these changes I ran "python mhegepgsnoop.py -o
tvguide.xml -v" successfully. But when I subsequently ran "mythfilldatabase
--file --sourceid 1 --xmlfile tvguide.xml" nothing was imported and I got a
long list of "Unknown xmltv channel identifier:" notices:

2014-10-21 13:00:46.559966 C mythfilldatabase version: fixes/0.27
[v0.27.3-109-g0dd5ab3] www.mythtv.org
2014-10-21 13:00:46.559994 C Qt version: compile: 4.8.6, runtime: 4.8.6
2014-10-21 13:00:46.559999 N Enabled verbose msgs: general
2014-10-21 13:00:46.560015 N Setting Log Level to LOG_INFO
2014-10-21 13:00:46.575594 I Bypassing grabbers, reading directly from file
2014-10-21 13:00:46.575660 I Added logging to the console
2014-10-21 13:00:46.576247 I Setup Interrupt handler
2014-10-21 13:00:46.576257 I Setup Terminated handler
2014-10-21 13:00:46.576265 I Setup Segmentation fault handler
2014-10-21 13:00:46.576276 I Setup Aborted handler
2014-10-21 13:00:46.576282 I Setup Bus error handler
2014-10-21 13:00:46.576291 I Setup Floating point exception handler
2014-10-21 13:00:46.576299 I Setup Illegal instruction handler
2014-10-21 13:00:46.576309 I Setup Real-time signal 0 handler
2014-10-21 13:00:46.576369 N Using runtime prefix = /usr
2014-10-21 13:00:46.576382 N Using configuration directory = /root/.mythtv
2014-10-21 13:00:46.576464 I Assumed character encoding:
2014-10-21 13:00:46.576474 W This application expects to be running a
locale that specifies a UTF-8 codeset, and many features may behave
improperly with your current language settings. Please set the LC_ALL or
LC_CTYPE, and LANG variable(s) in the environment in which this program is
executed to include a UTF-8 codeset (such as 'en_US.UTF-8').
2014-10-21 13:00:46.576850 N Empty LocalHostName.
2014-10-21 13:00:46.576859 I Using localhost value of
kauri.fritzandlily.com
2014-10-21 13:00:46.620825 N Setting QT default locale to en_NZ
2014-10-21 13:00:46.620914 I Current locale en_NZ
2014-10-21 13:00:46.620975 E No locale defaults file for en_NZ, skipping
2014-10-21 13:00:46.624965 I Loading en_us translation for module
mythfrontend
2014-10-21 13:00:46.629507 I Current MythTV Schema Version (DBSchemaVer):
1317
2014-10-21 13:00:46.638402 I MythCoreContext: Connecting to backend
server: 192.168.233.100:6543 (try 1 of 1)
2014-10-21 13:00:46.640166 I Using protocol version 77
2014-10-21 13:00:46.640402 I Opening blocking connection to master backend
2014-10-21 13:00:46.676557 I New Client: (#1)
2014-10-21 13:00:47.021726 N Unknown xmltv channel identifier: Al -
Skipping channel.
2014-10-21 13:00:47.021994 N Unknown xmltv channel identifier: Apna -
Skipping channel.
2014-10-21 13:00:47.022259 N Unknown xmltv channel identifier: CUE -
Skipping channel.
2014-10-21 13:00:47.022531 N Unknown xmltv channel identifier: ChineseTV -
Skipping channel.
2014-10-21 13:00:47.022789 N Unknown xmltv channel identifier: ChoiceTV -
Skipping channel.
2014-10-21 13:00:47.023045 N Unknown xmltv channel identifier: FOUR -
Skipping channel.
2014-10-21 13:00:47.023301 N Unknown xmltv channel identifier: Firstlight
- Skipping channel.
2014-10-21 13:00:47.023568 N Unknown xmltv channel identifier: Maori -
Skipping channel.
2014-10-21 13:00:47.023824 N Unknown xmltv channel identifier: PRIME -
Skipping channel.
2014-10-21 13:00:47.024079 N Unknown xmltv channel identifier: Parliament
- Skipping channel.
2014-10-21 13:00:47.024335 N Unknown xmltv channel identifier: Sommet -
Skipping channel.
2014-10-21 13:00:47.024609 N Unknown xmltv channel identifier: TV -
Skipping channel.
2014-10-21 13:00:47.024908 N Unknown xmltv channel identifier: TV2 -
Skipping channel.
2014-10-21 13:00:47.025159 N Unknown xmltv channel identifier: TV2+1 -
Skipping channel.
2014-10-21 13:00:47.025412 N Unknown xmltv channel identifier: TV29 -
Skipping channel.
2014-10-21 13:00:47.025664 N Unknown xmltv channel identifier: TV3 -
Skipping channel.
2014-10-21 13:00:47.025913 N Unknown xmltv channel identifier: TV33 -
Skipping channel.
2014-10-21 13:00:47.026162 N Unknown xmltv channel identifier: TVSN -
Skipping channel.
2014-10-21 13:00:47.026419 N Unknown xmltv channel identifier: Te -
Skipping channel.
2014-10-21 13:00:47.026671 N Unknown xmltv channel identifier: The -
Skipping channel.
2014-10-21 13:00:47.026922 N Unknown xmltv channel identifier: Yes -
Skipping channel.
2014-10-21 13:00:47.026931 I Updated programs: 0 Unchanged programs: 0
2014-10-21 13:00:47.038413 I Adjusting program database end times.
2014-10-21 13:00:47.145911 I 0 replacements made
2014-10-21 13:00:47.145919 I Marking generic episodes.
2014-10-21 13:00:47.236963 I Found 0
2014-10-21 13:00:47.236972 I Extending non-unique programids with multiple
parts.
2014-10-21 13:00:47.276668 I Found 0
2014-10-21 13:00:47.276676 I Fixing missing original airdates.
2014-10-21 13:00:47.364464 I Found 0 with programids
2014-10-21 13:00:47.387089 I Found 0 without programids
2014-10-21 13:00:47.387099 I Marking repeats.
2014-10-21 13:00:47.465658 I Found 0
2014-10-21 13:00:47.465665 I Unmarking new episode rebroadcast repeats.
2014-10-21 13:00:47.465984 I Found 0
2014-10-21 13:00:47.706478 I Marking episode first showings.
2014-10-21 13:00:48.100294 I Found 10715
2014-10-21 13:00:48.100301 I Marking episode last showings.
2014-10-21 13:00:48.672935 I Found 10624
2014-10-21 13:00:48.673697 I
===============================================================
| Attempting to contact the master backend for rescheduling. |
| If the master is not running, rescheduling will happen when |
| the master backend is restarted. |
===============================================================
2014-10-21 13:00:48.674151 N mythfilldatabase run complete.
2014-10-21 13:00:48.674190 I Waiting for threads to exit.

The database channels show this:

MariaDB [mythconverg]> select chanid,channum,xmltvid,name from channel;
+--------+---------+----------------------+----------------------+
| chanid | channum | xmltvid | name |
+--------+---------+----------------------+----------------------+
| 1036 | 36 | Apna | Apna Television |
| 1021 | 21 | Yes Shop | Yes Shop |
| 1029 | 29 | TV29 | TV29 |
| 1003 | 3 | TV3 | TV3 |
| 1004 | 4 | FOUR | FOUR |
| 1008 | 8 | TV3 PLUS1 | TV3 PLUS1 |
| 1018 | 18 | The Shopping Channel | The Shopping Channel |
| 1011 | 11 | The Edge TV | The Edge TV |
| 1009 | 9 | FOUR Plus 1 | FOUR Plus 1 |
| 1001 | 1 | TV ONE | TV ONE |
| 1002 | 2 | TV2 | TV2 |
| 1006 | 6 | TV ONE plus 1 | TV ONE plus 1 |
| 1007 | 7 | TV2+1 | TV2+1 |
| 1005 | 5 | Maori Television | Maori Television |
| 1022 | 22 | Parliament | Parliament |
| 1028 | 28 | ChineseTV | ChineseTV |
| 1010 | 10 | PRIME | PRIME |
| 1033 | 33 | TV33 | TV33 |
| 1012 | 12 | ChoiceTV | ChoiceTV |
| 1030 | 30 | | TVCentral |
| 1024 | 24 | Te Reo | Te Reo |
| 1031 | 31 | | TV Rotorua |
| 1032 | 32 | | Info-Rotorua |
| 1035 | 35 | | Channel North |
| 1026 | 26 | Firstlight | Firstlight |
| 1014 | 14 | Sommet Sports | Sommet Sports |
| 1040 | 40 | | CanterburyTV |
| 1039 | 39 | | DunedinTV |
| 1023 | 23 | CUE | CUE |
| 1034 | 34 | | East Coast TV |
| 2762 | 36-1402 | | |
| 2702 | 16 | | Al Jazeera |
| 2704 | 20 | TVSN Shopping | TVSN Shopping |
| 2502 | 1502 | Al Jazeera | Al Jazeera |
| 2504 | 1504 | | TVSN Shopping |
+--------+---------+----------------------+----------------------+

And the tvguidexml channel ids show this:

# grep "channel id" tvguide.xml |sed "s/\t<channel id=/channel=/g" | sed
's/"//g' | sed "s/>//g"
channel=Al Jazeera
channel=Apna
channel=ChineseTV
channel=ChoiceTV
channel=CUE
channel=Firstlight
channel=FOUR
channel=FOUR Plus 1
channel=
channel=Maori Television
channel=Parliament
channel=PRIME
channel=Sommet Sports
channel=Te Reo
channel=The Edge TV
channel=The Shopping Channel
channel=TVSN Shopping
channel=TV ONE
channel=TV2
channel=TV2+1
channel=TV29
channel=TV3
channel=TV3 PLUS1
channel=TV33
channel=TV ONE plus 1
channel=Yes Shop

It all seems to match. I'm pretty well stumped and am wondering if anyone
can assist? Thanks.
Re: mhegepgsnoop.py and mythfilldatabase not working. [ In reply to ]
On 21/10/14 13:10, Fritz Hildebrand wrote:
> Hi!
> I've been trying all morning to get the tv lisings into MythTV. I've
> got the latest version of MythTV installed on FC20 and am using
> mhegepgsnoop-0.6.0.py <http://mhegepgsnoop-0.6.0.py>.
>
> First of all I made the following chnages to in mhegepgsnoop-0.6.0.py
> <http://mhegepgsnoop-0.6.0.py>:
> 1. mysql_args = "-u mythtv -pmythtv"... wouldn't give me access to the
> database otherwise.
> 2. clean_titles = True
> clean_titles2 = True .. necessary as otherwise I was getting
> "AttributeError: 'Namespace' object has no attribute 'clean_titles2'".
>
> Anyway, after doing these changes I ran "python mhegepgsnoop.py -o
> tvguide.xml -v" successfully. But when I subsequently ran
> "mythfilldatabase --file --sourceid 1 --xmlfile tvguide.xml" nothing
> was imported and I got a long list of "Unknown xmltv channel identifier:"
Fritz,

With the way you are doing this the xmltv ID must be present in in your
Myth channels table. In the Myth channel setup there is a field for
xmltv id. It is probably easier to use mythweb to edit these though. The
ID can actually be anything as long as it is unique for every channel
that uses the same guide data.

mhegepgsnoop looks in this table to find the names of the channels it
puts in the guide data. mythfilldatabase in turn uses these to match
your myth channels to guide data channels.

I personally use tv_grab_nz-py which grabs data from (I think)
epg.org.nz. This requires a seperate setup step which doesn't appear to
comply with the xmltv spec. Run it from the command line with
--configure and it will ask which channels to include in the importable
guide data.

I am part way through assembling a cleaner mechanism for NZ guide data,
but I am (probably) a few weeks away yet. And it looks like the initial
setup will still be a PITA.

Short story; your way is fine.

Aaron.

_______________________________________________
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.py and mythfilldatabase not working. [ In reply to ]
On 21/10/14 15:23, Aaron Pelly wrote:
> This requires a seperate setup step which doesn't appear to comply with
> the xmltv spec. Run it from the command line with --configure and it
> will ask which channels to include in the importable guide data.

It's compliant; http://wiki.xmltv.org/index.php/XmltvCapabilities

--
http://nice.net.nz

_______________________________________________
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.py and mythfilldatabase not working. [ In reply to ]
On 21/10/14 16:37, Hadley Rich wrote:
> On 21/10/14 15:23, Aaron Pelly wrote:
>> This requires a seperate setup step which doesn't appear to comply with
>> the xmltv spec. Run it from the command line with --configure and it
>> will ask which channels to include in the importable guide data.
>
> It's compliant; http://wiki.xmltv.org/index.php/XmltvCapabilities
>
Touché Hads! Sorry I spoke nonsense on the list.

I haven't been back to that page for a while, when I read it a few weeks
ago I got the impression that Myth was supposed to be able to run it
(well, any grabber actually) interactively from the video sources setup.
I haven't looked in any detail, but this failed to work for me.

Aaron.


_______________________________________________
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.py and mythfilldatabase not working. [ In reply to ]
Got it working. The xmltv I'd in Mythtv has to be unique for each channel AND cannot contain any spaces. Once I got rid of the spaces in mythtv for the xmltv ids ('TV ONE' became 'TVONE' for example), then it worked perfectly! Thanks for the replies.

Fritz
Mob: 021 245 4173

> On 21/10/2014, at 3:23 pm, Aaron Pelly <apelly@monkeymasters.co.nz> wrote:
>
>> On 21/10/14 13:10, Fritz Hildebrand wrote:
>> Hi!
>> I've been trying all morning to get the tv lisings into MythTV. I've got the latest version of MythTV installed on FC20 and am using mhegepgsnoop-0.6.0.py <http://mhegepgsnoop-0.6.0.py>.
>>
>> First of all I made the following chnages to in mhegepgsnoop-0.6.0.py <http://mhegepgsnoop-0.6.0.py>:
>> 1. mysql_args = "-u mythtv -pmythtv"... wouldn't give me access to the database otherwise.
>> 2. clean_titles = True
>> clean_titles2 = True .. necessary as otherwise I was getting "AttributeError: 'Namespace' object has no attribute 'clean_titles2'".
>>
>> Anyway, after doing these changes I ran "python mhegepgsnoop.py -o tvguide.xml -v" successfully. But when I subsequently ran "mythfilldatabase --file --sourceid 1 --xmlfile tvguide.xml" nothing was imported and I got a long list of "Unknown xmltv channel identifier:"
> Fritz,
>
> With the way you are doing this the xmltv ID must be present in in your Myth channels table. In the Myth channel setup there is a field for xmltv id. It is probably easier to use mythweb to edit these though. The ID can actually be anything as long as it is unique for every channel that uses the same guide data.
>
> mhegepgsnoop looks in this table to find the names of the channels it puts in the guide data. mythfilldatabase in turn uses these to match your myth channels to guide data channels.
>
> I personally use tv_grab_nz-py which grabs data from (I think) epg.org.nz. This requires a seperate setup step which doesn't appear to comply with the xmltv spec. Run it from the command line with --configure and it will ask which channels to include in the importable guide data.
>
> I am part way through assembling a cleaner mechanism for NZ guide data, but I am (probably) a few weeks away yet. And it looks like the initial setup will still be a PITA.
>
> Short story; your way is fine.
>
> Aaron.
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz@lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/

_______________________________________________
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.py and mythfilldatabase not working. [ In reply to ]
On 21/10/14 17:39, Aaron Pelly wrote:
> I got the impression that Myth was supposed to be able to run it (well,
> any grabber actually) interactively from the video sources setup. I
> haven't looked in any detail, but this failed to work for me.

Yeah, didn't work for me either but I've not set up Myth for a number of
years.

hads
--
http://nice.net.nz

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