raptor2101 / Mediathek

GNU General Public License v3.0
45 stars 16 forks source link

ARD/KIKA broken #93

Closed henkela closed 7 years ago

henkela commented 7 years ago

Hi, I'm running osmc with KODI 17. After the update to 0.7.5 of your Mediathek the list of available categories/movies/streams is a list of empty elements. kodi.log states: Exception 19:51:49 91033.921875 T:1330050032 ERROR: TypeError 19:51:49 91033.921875 T:1330050032 ERROR: : 19:51:49 91033.921875 T:1330050032 ERROR: "'NoneType' object is not callable" 19:51:49 91033.921875 T:1330050032 ERROR: in 19:51:49 91033.921875 T:1330050032 ERROR: 'lxml.etree._ExceptionContext._store_raised' 19:51:49 91033.921875 T:1330050032 ERROR: ignored

I find this issue a bit confusing since your change log states that you changed to beautifulsoup instead of lxml.
I did a local roll back to 0.7.2, which I had in the local cache, which solved the issue.

Maybe I'm missing a system package? Any hint welcome.

Best, Andreas

raptor2101 commented 7 years ago

can you give me a full log

henkela commented 7 years ago

Well, actually, that's the full log - these lines just repeat over and over again. That's the reason why I decided to file an issue.

raptor2101 commented 7 years ago

i need a log from the point where you opening the plugin ...

on my test-setups KIKA und ard works well.

If the problems is beautifulsoup related, than this is caused of the usage in simplexbmc.py. The function isn't used from ard.py but, while instancing this error could be triggered.

in that case every "mediathek" should trigger this error.

basis42 commented 7 years ago

Hi @raptor2101, I can reproduce the above issue on kodi 17 / libreelec. As I'm quite new to Kodi, can you point me to an documentation how to enable debug logging? Maybe I can help out on this, and, additionally my son offers some of his christmas sweets for fixing KIKA ;-).

raptor2101 commented 7 years ago

Navigate to the KODI UserDependent files (windows, linux, ... see here http://kodi.wiki/view/userdata)

next to the userdate (not within) there is a temp-folder containing a kodi.log file.... paste me these or the relevant parts (from opening the plugin)...

if needed urgent support (child over-rect sometimes :D) you can contact me via Instant messaging ... :D

basis42 commented 7 years ago

Hi @raptor2101,

sorry this took a while, find the log here: http://pastebin.com/nS5LWrpH

Digging a little deeper it seems that everything works as intended, only the data doesn't contain what it promises. My concrete example is the page http://www.kika.de/loewenzaehnchen/sendungen/sendung72704.html

which doesn't contain a videolink, as far as I can see in the log ... .... 22:07:14.332 T:1874850720 DEBUG: [Mediathek]: found 0 video links 22:07:14.392 T:1874850720 DEBUG: [Mediathek]: found 1 page links ....

An even worse it it ends up in a endless loop, because the page link points to the parent of the above mentioned page. So, most likely there is not much you can do.

macmeck commented 7 years ago

Well, I have about the same behaviour... The log gives me this in a loop

19:56:48.112 T:140625693378304   ERROR: Exception
19:56:48.112 T:140625693378304   ERROR: TypeError
19:56:48.112 T:140625693378304   ERROR: :
19:56:48.112 T:140625693378304   ERROR: "'NoneType' object is not callable"
19:56:48.112 T:140625693378304   ERROR:  in
19:56:48.112 T:140625693378304   ERROR: 'lxml.etree._ExceptionContext._store_raised'
19:56:48.112 T:140625693378304   ERROR:  ignored

And from time to time I see this

19:58:46.855 T:140625743701760   ERROR: /var/local/kodi/.kodi/addons/script.module.beautifulsoup4/lib/bs4/__init__.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

                                            The code that caused this warning is on line 90 of the file /var/local/kodi/.kodi/addons/plugin.video.mediathek/default.py. To get rid of this warning, change code that looks like this:

                                             BeautifulSoup([your markup])

                                            to this:

                                             BeautifulSoup([your markup], "lxml")

                                              markup_type=markup_type))

I hope this helps to solve the issue.

raptor2101 commented 7 years ago

@macmeck: can you give me access to the full log. at least wich page causes this error

macmeck commented 7 years ago

not much more to see though ;-)

https://gist.github.com/macmeck/00b3c0d04e097e1663f04097b5b42c1a

raptor2101 commented 7 years ago

you log has nothing todo with the reported problem (kika.py isn't loaded at this time)

but if done two changes to orf and arte.py can you try the lastest build (manually download via github) and retest if you problem still exists ...

macmeck commented 7 years ago

I had the issue when playing from the ARD mediathek... now upgraded to the latest version from github but still the same

raptor2101 commented 7 years ago

can you post a second logfile ...?

macmeck commented 7 years ago

sure: https://gist.github.com/macmeck/5494ded7c73e76c0c54dec477a36cc17

raptor2101 commented 7 years ago

fixes the last lines who can trigger this message... please retry

macmeck commented 7 years ago

You mean 85b7eabd3591e9ee4ff4cd05d3a250435674e1fc? This only changes the arte mediathek, right? But I'm experiencing my issues on ARD... Still exactly the same in the log.

Checking the code, ARD doesn't even reference BeautifulSoup. Is there something wrong with the routing somewhere and the wrong code is being executed?

raptor2101 commented 7 years ago

Bacause you log only contains errers, i'am unable do determine the exact location. so i'am trying to isolate certain "problemfiles".

next try

macmeck commented 7 years ago

Okay, I'll give it a shot later today... anything I can change in the log settings to provide more helpful output?

macmeck commented 7 years ago

Nice, 06aec959d89d582817dc14d817ace8419f17d0c3 fixed it for me! Thanks a lot.

raptor2101 commented 7 years ago

ok so i close this an will push this to upstream :)