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

standalone mvupdate: Failure writing Filmliste-akt.xz #135

Closed
ahpohl opened this issue Nov 10, 2019 · 5 comments
Closed

standalone mvupdate: Failure writing Filmliste-akt.xz #135

ahpohl opened this issue Nov 10, 2019 · 5 comments
Labels
done The issue was soled or implemented

Comments

@ahpohl
Copy link

ahpohl commented Nov 10, 2019

The standalone update of the mediathekview database fails in both sqlite and mysql modes. I downloaded the code from the git master branch.

Here is the output for mysql:

2019-11-10 12:09:57.597094 NOTICE [mvupdate-0.6.2]: Startup
2019-11-10 12:09:57.597596 NOTICE [mvupdate-0.6.2:MediathekViewUpdater]: Database driver: External (mysql)
2019-11-10 12:09:57.597827 NOTICE [mvupdate-0.6.2:StoreMySQL]: Using MySQL connector version 8.0.18
2019-11-10 12:09:57.634239 NOTICE [mvupdate-0.6.2:StoreMySQL]: Connected to server localhost running 10.4.9-MariaDB
2019-11-10 12:09:57.637832 NOTICE [mvupdate-0.6.2]: Starting up...
2019-11-10 12:09:57.642670 NOTICE [mvupdate-0.6.2]: Initiating full update...
2019-11-10 12:09:57.643123 NOTICE [mvupdate-0.6.2:MediathekViewUpdater]: Cleaning up old downloads...
2019-11-10 12:09:57.643433 NOTICE [mvupdate-0.6.2:MediathekViewUpdater]: Trying to download Filmliste-akt.xz from https://liste.mediathekview.de/Filmliste-akt.xz...
2019-11-10 12:09:58.258429 ERROR [mvupdate-0.6.2:MediathekViewUpdater]: Failure writng https://liste.mediathekview.de/Filmliste-akt.xz
2019-11-10 12:09:58.259003 NOTICE [mvupdate-0.6.2:MediathekViewUpdater]: Cleaning up downloads...
2019-11-10 12:09:58.259524 NOTICE [mvupdate-0.6.2]: Exiting...

And here for sqlite:

2019-11-10 12:13:40.330898 NOTICE [mvupdate-0.6.2]: Startup
2019-11-10 12:13:40.331363 NOTICE [mvupdate-0.6.2:MediathekViewUpdater]: Database driver: Internal (sqlite)
2019-11-10 12:13:40.331655 NOTICE [mvupdate-0.6.2:StoreSQLite]: Using SQLite version 3.30.1, python library sqlite3 version 2.6.0
2019-11-10 12:13:40.333688 NOTICE [mvupdate-0.6.2]: Starting up...
2019-11-10 12:13:40.334428 NOTICE [mvupdate-0.6.2]: Initiating full update...
2019-11-10 12:13:40.334681 NOTICE [mvupdate-0.6.2:MediathekViewUpdater]: Cleaning up old downloads...
2019-11-10 12:13:40.334897 NOTICE [mvupdate-0.6.2:MediathekViewUpdater]: Trying to download Filmliste-akt.xz from https://liste.mediathekview.de/Filmliste-akt.xz...
2019-11-10 12:13:40.957715 ERROR [mvupdate-0.6.2:MediathekViewUpdater]: Failure writng https://liste.mediathekview.de/Filmliste-akt.xz
2019-11-10 12:13:40.958363 NOTICE [mvupdate-0.6.2:MediathekViewUpdater]: Cleaning up downloads...
2019-11-10 12:13:40.958875 NOTICE [mvupdate-0.6.2]: Exiting...

Environment Arch Linux aarch64 on Odroid C2
Python: 3.7.4
python-ijson 2.3-1
python-defusedxml 0.6.0-1
python-mysql-connector 8.0.18-1

The mediathekview addon plugin on a raspberry pi 2 running libreelec 9.0.2 with kodi works as expected. The mysql database itself runs on the Odroid C2 and was successfully created and populated by kodi.

Any ideas?

@ahpohl
Copy link
Author

ahpohl commented Nov 10, 2019

in resources/lib/updater.py, I added a print(err) statement in the get_newest_list(self, full) function after line 366 self.logger.error('Failure writng {}', url).

This is the actual error leading to the download failure:
'HTTPMessage' object has no attribute 'getheader'

Looks like a python2 to python3 incompatibility issue in the urllib module.

@ahpohl
Copy link
Author

ahpohl commented Nov 10, 2019

I have made a patch against the current master branch. mysql update seems to work and is currently building the database, but sqlite still shows an error:

ERROR [mvupdate-0.6.2:MediathekViewUpdater]: Error Unicode-objects must be encoded before hashing while processing ./Filmliste-akt on update cycle 0

So nearly there ...
How to publish and review the current changes to the code?

@ahpohl
Copy link
Author

ahpohl commented Nov 10, 2019

Both problems solved for me using python3. Here is the complete patch.
mediathekview_python3.txt

alex1702 added a commit that referenced this issue Apr 29, 2020
@codingPF codingPF added the done The issue was soled or implemented label Apr 29, 2020
@codingPF
Copy link
Member

Ich sehe noch nicht wie dieser patch alle phyton 3 probleme lösen kann aber es ist ein Anfang. Für Phyton 3 wird man ein branch aufmachen müssen.

@codingPF
Copy link
Member

Released to official Kodi Repo in v0.6.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done The issue was soled or implemented
Projects
None yet
Development

No branches or pull requests

3 participants