Skip to content
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

Can't retrieve channel list #40

Open
CSchulz opened this issue Nov 28, 2015 · 20 comments
Open

Can't retrieve channel list #40

CSchulz opened this issue Nov 28, 2015 · 20 comments
Labels

Comments

@CSchulz
Copy link

CSchulz commented Nov 28, 2015

I am using tvheadend 4.1

{"sw_version": "4.1","api_version": 15,"name": "Tvheadend","capabilities": ["caclient","tvadapters","satip_client","satip_server","imagecache","timeshift","trace"]}

If I click on all channels or select a bouquet I get the error message "Request failed! Please check channel settings and tvheadend status."

The log contains following:

2015-11-28 15:29:01,409 (7ff4757fa700) :  INFO (__init__:104) - JSON-Request: getServiceGrid
2015-11-28 15:29:01,410 (7ff4757fa700) :  DEBUG (networking:166) - Requesting 'http://192.168.178.3:9981/api/mpegts/service/grid?start=0&limit=999999'
2015-11-28 15:29:01,411 (7ff4757fa700) :  DEBUG (networking:166) - Requesting 'http://192.168.178.3:9981/api/mpegts/service/grid?start=0&limit=999999'
2015-11-28 15:29:01,412 (7ff4757fa700) :  INFO (__init__:132) - JSON-Request failed: exceptions must be old-style classes or derived from BaseException, not str
2015-11-28 15:29:01,412 (7ff4757fa700) :  INFO (__init__:151) - Failed to fetch DVB services!
2015-11-28 15:29:01,412 (7ff4757fa700) :  INFO (__init__:242) - Could not create channellist! Showing error.
2015-11-28 15:29:01,417 (7ff4757fa700) :  DEBUG (runtime:924) - Response: [200] MediaContainer, 437 bytes
@jacotec
Copy link

jacotec commented Nov 29, 2015

Exactly the same issue here, using TVH 4.0.7 (stable release). Did also not work with the latest 4.1 build.

Recordings are working fine in Plex, but live TV is impossible due to that bug.

2015-11-29 17:49:57,505 (7f736c9cc700) : DEBUG (networking:166) - Requesting 'http://10.0.6.1:9981/api/mpegts/service/grid?start=0&limit=999999'
2015-11-29 17:49:57,507 (7f736c9cc700) : ERROR (networking:217) - Error opening URL 'http://10.0.6.1:9981/api/mpegts/service/grid?start=0&limit=999999'
2015-11-29 17:49:57,508 (7f736c9cc700) : DEBUG (networking:166) - Requesting 'http://10.0.6.1:9981/api/mpegts/service/grid?start=0&limit=999999'
2015-11-29 17:49:57,509 (7f736c9cc700) : ERROR (networking:217) - Error opening URL 'http://10.0.6.1:9981/api/mpegts/service/grid?start=0&limit=999999'
2015-11-29 17:49:57,509 (7f736c9cc700) : INFO (init:132) - JSON-Request failed: exceptions must be old-style classes or derived from BaseException, not str
2015-11-29 17:49:57,509 (7f736c9cc700) : INFO (init:151) - Failed to fetch DVB services!
2015-11-29 17:49:57,509 (7f736c9cc700) : INFO (init:242) - Could not create channellist! Showing error.
2015-11-29 17:49:57,512 (7f736c9cc700) : DEBUG (runtime:88) - Sending packed state data (113 bytes)
2015-11-29 17:49:57,512 (7f736c9cc700) : DEBUG (runtime:924) - Response: [200] MediaContainer, 437 bytes

Entering the "failing" URL in a web browser works.

@jacotec
Copy link

jacotec commented Dec 1, 2015

UPDATE @CSchulz

I've found the problem! You need to tag the user in TVH which you use in the plugin as an "admin"!

@realriot :

Not sure if this is mandatory, if not you may consider changing this in the next update to not need admin level. I'm a bit careful not passing admin level logins to other services ;-)

@fritz-fritz
Copy link
Contributor

I vaguely remember needing to do this a long time ago and haven't taken a look at it closely. I think it is unfortunately necessary as I have seen similar requirements in the iOS client as well. It may be needed to interact with the API. If I get a chance I'll take a look but it might be simpler to list it as a necessary requirement in the README.

@nmatthews
Copy link

I'm having this problem despite having an admin user in TVH. Any guesses as to what else could be causing the issue? TVheadend 4.1-1171~gaa13922 and Plex 0.9.12.19.

The plex channel manages to populate the list of bouquets with my list of channel tags from TVheadend (I don't otherwise have bouquets specified), so it's clearly talking to the tvh server somehow, but that's all it can get.

@oriolj
Copy link
Contributor

oriolj commented Dec 29, 2015

I have a similar issue caused by encoding problems. Maybe your list of channels have special characters?

@DaveInTO
Copy link

getting similar issues..
tvheadend 4.1-1258~gb480c92 amd64 Tvheadend
2015-12-30 14:15:23,157 (7ff31bfff700) : INFO (init:104) - JSON-Request: getChannelGrid
2015-12-30 14:15:23,160 (7ff31bfff700) : DEBUG (networking:166) - Requesting 'http://192.168.0.10:9981/api/channel/grid?start=0&limit=999999'
2015-12-30 14:15:23,166 (7ff31bfff700) : INFO (init:134) - JSON-Request successfull!
2015-12-30 14:15:23,166 (7ff31bfff700) : INFO (init:104) - JSON-Request: getEpgGrid
2015-12-30 14:15:23,169 (7ff31bfff700) : DEBUG (networking:166) - Requesting 'http://192.168.0.10:9981/api/epg/events/grid?start=0&limit=2000'
2015-12-30 14:15:23,304 (7ff31bfff700) : DEBUG (networking:161) - Fetching 'http://192.168.0.10:9981/api/epg/events/grid?start=0&limit=2000' from the HTTP cache
2015-12-30 14:15:23,307 (7ff31bfff700) : INFO (init:132) - JSON-Request failed: exceptions must be old-style classes or derived from BaseException, not str
2015-12-30 14:15:23,308 (7ff31bfff700) : INFO (init:104) - JSON-Request: getServiceGrid
2015-12-30 14:15:23,310 (7ff31bfff700) : DEBUG (networking:166) - Requesting 'http://192.168.0.10:9981/api/mpegts/service/grid?start=0&limit=999999'
2015-12-30 14:15:23,319 (7ff31bfff700) : INFO (init:134) - JSON-Request successfull!
2015-12-30 14:15:23,319 (7ff31bfff700) : INFO (init:242) - Could not create channellist! Showing error.
2015-12-30 14:15:23,321 (7ff31bfff700) : DEBUG (runtime:88) - Sending packed state data (113 bytes)
2015-12-30 14:15:23,321 (7ff31bfff700) : DEBUG (runtime:924) - Response: [200] MediaContainer, 437 bytes

@damhau
Copy link

damhau commented Jan 1, 2016

Hi,

I had exactly the same problem and it was because of a channel name that the plugin didn't like.
Try disabling a few channel in tvheadend until it works, then re-enable them one by one (or ten by ten) and you should find the channel that the plugin doesn't like.

Damien

@CSchulz
Copy link
Author

CSchulz commented Jan 7, 2016

Do you remember how the name looked like? It would be easier for debugging and finding the root cause.

@damhau
Copy link

damhau commented Jan 7, 2016

Yeah I know but saddly the name was pretty standard, something like Poland TV.
I even checked in notepad++ to see if there was any special character but didn't find anything.

What else can I do to help ?

@CSchulz
Copy link
Author

CSchulz commented Jan 7, 2016

Perhaps you can try to reproduce it and store the webservice result.

@DaveInTO
Copy link

DaveInTO commented Jan 7, 2016

results.txt

@DaveInTO
Copy link

DaveInTO commented Jan 7, 2016

There are the results from the web service that i think is causing the issue

@oscar-b
Copy link

oscar-b commented Jan 10, 2016

I added some additional debugging and got this:

2016-01-10 23:39:04,363 (7f5de3fff700) :  INFO (__init__:104) - JSON-Request: getServiceGrid
2016-01-10 23:39:04,364 (7f5de3fff700) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:9981/tv/api/mpegts/service/grid?start=0&limit=999999'
2016-01-10 23:39:05,068 (7f5de3fff700) :  INFO (__init__:126) - (2103, 'Data of size 6777367 is greater than the maximum size 5242880')

@realriot ?

@oscar-b
Copy link

oscar-b commented Jan 11, 2016

I was able to get it running by adding a max_size=10000000 parameter to the JSON.ObjectFromURL call in def getTVHeadendJson(), based on this reply: http://forums.plex.tv/discussion/comment/364315/#Comment_364315

Not sure if there are other issues though, since I can't test properly at the moment.

@realriot realriot added the bug label Jan 22, 2016
@realriot
Copy link
Owner

I'll add this workaround.

I really really want everyone to trigger the plex guys to update/offer the latest dev documentation. They really don't support the community anymore.

@CSchulz
Copy link
Author

CSchulz commented Feb 5, 2016

It sounds more like an issue in the paging of the result

@oscar-b
Copy link

oscar-b commented Feb 6, 2016

It's neither a paging issue or a workaround. The reply is simply too large for the Plex libraries upper size limit. The real question is why you're requesting all services instead of just the configured channels.

Anyway, I'm not using this anymore.

@espiman
Copy link

espiman commented Apr 21, 2016

Hi.

How I fix this?

Regards.

@damhau
Copy link

damhau commented Apr 22, 2016

For me the solution was to delete the channel that was causing the error.

Sent from my iPhone

On 21 Apr 2016, at 23:49, espiman [email protected] wrote:

Hi.

How I fix this?

Regards.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@espiman
Copy link

espiman commented Apr 22, 2016

Thanks damhau.

I have only enabled one channel and problem persist.

I have also tried to modify the line 124 in init.py file, but problem persist.

json_data = JSON.ObjectFromURL(encoding='utf-8', url=url, headers=headers, values=None, max_size= 10000000)

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants