Closed daherlihy closed 4 years ago
I have the same problem
`15:10:51.693 T:7990 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
Same here, does not restore on Android ^
Looks like this is a problem with generating archive backups. The archive doesn't include the userdata
folder and it fails to restore. Switching off the "archive" option before backing up seems to fix it.
^ the above, or apparently extracting a compressed backup which can be used to restore? I may be wrong with this ..
It's a zip issue on Android, restoring a zipped backup needs to be uncompressed first.. where it fails.
I found a fix by adding a modified zipfile.py to the addon. Now I can backup and restore without issues.
For what it's worth, I extracted a zip file and it didn't work, it was missing the userdata dir.
@unlocKing would you mind sharing the modified zipfile.py you are using? I vaguely recall issues in the past with zip files on Android systems. I'll have to dig back through some commits to remind myself but at the time I think it was a python version issue. Not sure exactly what may have changed from Kodi 17 to 18 but wonder if it is a similar issue where a library was updated and I'll need to adjust.
@robweber Sure, you can send me a secure chat to my GitHub account at Keybase:
I have more questions than I have answers on this one. I have an Android phone and I put Kodi 18 and the Backup app from the repo on it. I'm able to backup and restore compressed archives without an errors on this device.
Is everyone with this issue doing a similar thing or are the archives created on another device or something like that?
I'm using the version from here 1.1.3, on Kodi repo it's still 1.1.2
1.1.2 does not work with Leia for me..
Created new compressed full backup of Kodi 18, tried to restore (fails).
1.1.3 worked with the updated zipfile.py
Thanks for the info. I'll get that file from you, just haven't had time to install keybase and get it working.
I'm using devices across 2 environments - Android and Raspberry Pi. Let me know what you want to test Rob
Getting a similar failure restoring backups on Windows 10, Kodi 18.
Backup created by the Backup Add-on with compression enabled. File unzips fine with WinZip (No Errors) but falls on it's face with the add-on. Archive support (and RAR support) is installed / enabled.
Kodi log failure message:
20:07:27.116 T:5724 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
Dan / Gib.
Could anyone having this issue please tell me the size of the zip file and if they made it on the same system they're seeing it on? If possible could you try only backing up something minor (like maybe just config files?) and seeing if you have the same issue.
Of greatest help would be one of these zip files (small, no personal info) that I could test. In trying on Android and Windows I've not been able to get my systems to do the same thing. The error definitely points to an error in the zip file but it's weird it seems to happen for lots of people on Kodi 18 that didn't have it before. Thanks!
I'm only backing up addons (not data or any config files), file size ranges between 70mb add 300mb
Are you backing up to a network or a local file location? I'm wondering is the zip file being corrupted in transit somehow across a network connection? What happens if you move the file yourself locally and then try and restore that way?
I'm just having a really hard time recreating this. I've tried 3 different platforms (Windows, Android, and Rpi), doing clean installs, and they've all worked for me. I just can't find a combo that results in this for some reason.
I backed up to a network share. The file unzipped fine, although the userdata dir was missing on unzip, and, looking at it now, it isn't. I wonder if that had anything to do with it. I will try another export, although I don't have my old Kodi install any more (I replaced it with the one I wanted to restore on).
Erm, the file size on my backup was about 7.13GB. Most of which is down to the Thumbnails folder, and several skins (using uncompressed graphics).
File opens fine in WinZip, and extracts without errors with it, but Not so with the Kodi / Backup Add-on. I've zeroed my config due to an unrelated issue, so can't provide a smaller sample at this time. But Once I get to the bottom of the unrelated issue, I''ll have a play about and try several different types (sizes) of backup and see what results I get. Feedback in due course.
EDIT: The backup was performed on the local machine, but the target was a personal user share on a QNAP TS453-Pro NAS, running the latest available QTS firmware, if that helps. SMB networking in use, as QNAP's NFS support is less than perfect.
My zip size is 67.6MB created and saved locally on the Android device, never tested with a network storage device.
A Kodi 17.6 created zip will not restore on Kodi 18 with my numerous tests of different backups of sizes upto 300MB.
Just to confirm, I have created the backup on Kodi 18 and tried to restore on the same device where it keeps failing with your addon..
(adding the new zipfile.py to the addon was the only solution with success for me on numerous devices)
I've tried backing up locally and even restoring it within the same location/device is recreating the issue
unlocKing can you share your zipfile PLS
Just popping in to provide some feedback that will hopefully help out. I've just experienced this issue for the first time today. Here are the details I've gathered so far (All devices are running Kodi v18) -
Created a full zip backup of Kodi on my Windows 10 PC using the add-on (roughly 340mb). Copied the file to a USB 3.0 drive. Plugged the flash drive into my TV (Sony Bravia running Android TV OS base Android version 7) and copied the zip to the device storage. Did a full wipe of Kodi on the TV after insuring it was the latest version. Started kodi up and installed the backup add-on from the Kodi repo. Set backup location to local folder where I copied the zip. Attempted to restore and got a failure before the zip started extracting. Tried the same process again but this time using my network FTP storage. Same thing.
Installed kodi on my phone (Samsung Galaxy S8+ running Android 9) followed the same process and was able to restore the exact same backup files successfully via network and local storage. No errors and nothing appears to be missing.
I also have a Xiaomi Mibox running Android 8 that I will test out in the next day or so to see what happens.
I have a Galaxy S8 as well and didn't have any issues on that device. What's odd is the version of python bundled with Kodi should be the same across all devices.
I have a Galaxy S8 as well and didn't have any issues on that device. What's odd is the version of python bundled with Kodi should be the same across all devices.
What steps did you go about in backing up and restoring? it might have something to do with what is being backed up
Reference my issue with the "Bad Magic Number" on restore attempt, I tried doing a backup containing ONLY add-ons and add-on data, I also specified a local drive, rather than a NAS share. This restored without issue.
So it's an issue related to the size of the backup, or the fact it's being stored remotely. I would however rule out corruption, since WinZip was able to extract the previous (large) backup without suggesting any warnings or errors for the files contained within.
When I get chance, I'll do another test with the same dataset, but to the NAS share. I will also point out at this point I'm also backing up two custom folders (I need more custom folder provision here too) so may need to do testing with regards that.
hi all. just inquiring into the status of this issue, as i've just made a compressed backup of my Android kodi installation to Armlogic NAS and am wondering if it's safe to have this backup ¨in case of emergency¨. Also I would be glad to do some testing if required.
unlocKing can you share your zipfile please?
@unlocKing can you please share your fix with with the modified zipfile.py so that this issue can be fixed for everyone with this problem?
This issue has been automatically marked as inactive because it has not had recent activity. It will be closed if no further activity occurs.
I just had the very same problem today. Any chance of getting a fix posted to the add-on repo ?
Anyone with this same issue can reference the custom branch with a special zipfile fix applied.
Ran into this issue today (backup compressed on LibreELEC with Kodi 18.9; restore on Kodi for Android, Android TV 8.0; backup stored on SMB share).
Any chance the fix will make it into a released build?
More than likely no. The custom file was modified from the one bundled with a build of Python 2. It is significantly different than the Python 3 counterpart. I'm glad this worked in the interim however with the move to Python 3 in Kodi I'm not going to try and work my way through someone else's modded file and figure out what's needed.
Hi,
I know issue is closed, but I experiment the same issue. I saved on dropbox. I reproduce it in all cases, but the worst is the simplest :
Then I change the backup destination from dropbox to NFS folder and it works...
~~@robweber is there at least any manual workaround for this bug? Can the archive be extracted on another machine and then transferred to a certain path and backup from that?~~
Nevermind. It worked exactly like that:
I extracted the archive and put the directory to Android/data/org.xbmc.kodi/files/.kodi/temp/
afterwards everything worked like expected.
@ludoo0d0a - Just confirm are you saying you did the following:
This is somewhat different than what people have reported in the past. This issue is for Android issues specifically where compressed archives get created but cannot be restored from. The issue is with the Python 2 implementation of the zip archive. I have not received any confirmation that this issue bleeds over into Python 3. I'd be curious if you log shows the same "bad magic number" error when testing from Dropbox and NFS. That would at least confirm its the same problem.
Im getting errors when attempting to restore a compressed backup. I'm backing up while using Kodi Leia 18 and restoring in the same environment.
To stress, no issues with backing-up compressed or non-compressed, and restoring non-compressed, just the restore action for compressed backups isn't working.