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

BadZipfile: File is not a zip file #2

Open
AlexGreg opened this issue Nov 18, 2014 · 2 comments
Open

BadZipfile: File is not a zip file #2

AlexGreg opened this issue Nov 18, 2014 · 2 comments

Comments

@AlexGreg
Copy link
Contributor

Sometimes when I try to pull the subs it gives me this exception:

2014-11-18 07:46:47,775 (7f02a77fe700) : CRITICAL (agentkit:983) - Exception in the update function of agent named 'ItalianSubsAgent', called with guid 'com.plexapp.agents.thetvdb://269578?lang=en' (most recent call last): File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 979, in _update agent.update(obj, media, lang, force) File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/ItalianSubsAgent.bundle/Contents/Code/__init__.py", line 322, in update subtitle = search_subtitle(name, filename, season, episode, tvdb_id) File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/ItalianSubsAgent.bundle/Contents/Code/__init__.py", line 277, in search_subtitle subtitle_contents = unzip(subtitle_contents, episode) File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/ItalianSubsAgent.bundle/Contents/Code/__init__.py", line 249, in unzip z = zipfile.ZipFile(bfr) File "/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/zipfile.py", line 766, in __init__ self._RealGetContents() File "/usr/lib/plexmediaserver/Resources/Python/lib/python2.7/zipfile.py", line 807, in _RealGetContents raise BadZipfile, "File is not a zip file" BadZipfile: File is not a zip file

After some retries it downloads it correctly

@paolobernardi
Copy link
Owner

It should be an issue related to some API limits of ItalianSubs, I have to investigate it.
A workaround would be a try/retry block until the file is downloaded fine.

@AlexGreg
Copy link
Contributor Author

yep. In fact, is what I am actually doing :-)

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

No branches or pull requests

2 participants