question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with loding gevent: BadZipfile: File is not a zip file

See original GitHub issue

Versions

  • Python: 2.7.15rc1
  • OS: Ubuntu 18.04 amd64
  • Kivy: master
  • Cython: 0.25

Description

It should load gevent. Instead gevent loading causes a python error about some zip file being broken/missing. I think this is an error that occurs during bundling (it’s looking for something at the wrong place), that’s why I have reported it here.

buildozer.spec

Command:

buildozer android release

Spec file:

[app]
warn_on_root = 0
buildozer.warn_on_root = 0
title = ZeroNetN
package.name = zeronet
package.domain = luna.mkg20001
source.dir = src
source.include_exts = 
source.exclude_exts = dll, cmd, exe
source.exclude_dirs = Test, zero/src/Test
version.regex = self\.version = ['"](.*)['"]
version.filename = %(source.dir)s/zero/src/Config.py
requirements = sqlite3,typing,openssl,m2crypto,gevent,msgpack-python,pil,hostpython2,git+https://github.com/kivy/plyer,android,kivy,sentry_sdk,urllib3,certifi
p4a.branch = master
presplash.filename = %(source.dir)s/splash.png
icon.filename = %(source.dir)s/icon.png
orientation = all
services = zn:service.py
osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.permissions = INTERNET
android.api = 28
android.minapi = 21
android.ndk_api = 21
android.private_storage = True
android.whitelist = sqlite3
android.accept_sdk_license = True
p4a.branch = master
android.arch = armeabi-v7a
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.7.0
[buildozer]
log_level = 2
warn_on_root = 1
title = ZeroNetN

APK files: https://gitlab.com/mkg20001-gh/ZeroNet-kivy/-/jobs/171320223/artifacts/browse/release/

Logs

Build: https://gitlab.com/mkg20001-gh/ZeroNet-kivy/-/jobs/171270719/raw

Application:

03-05 12:37:31.035 15940 15954 I zn      : Traceback (most recent call last):
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/app/zero/zeronet.py", line 24, in main
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/app/zero/src/main.py", line 13, in <module>
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/gevent/monkey.py", line 966, in patch_all
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/gevent/monkey.py", line 168, in _notify_patch
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/gevent/events.py", line 112, in notify_and_call_entry_points
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 2320, in load
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 2343, in require
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 764, in resolve
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 975, in __init__
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 1007, in scan
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 1884, in find_eggs_in_zip
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 1416, in resource_listdir
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 1759, in _listdir
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 1739, in _index
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 1630, in zipinfo
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 1590, in load
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/python-installs/zeronet/pkg_resources/__init__.py", line 1563, in build
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/other_builds/python2-openssl-sqlite3/armeabi-v7a__ndk_target_21/python2/Lib/zipfile.py", line 770, in __init__
03-05 12:37:31.035 15940 15954 I zn      :   File "/home/data/.buildozer/android/platform/build/build/other_builds/python2-openssl-sqlite3/armeabi-v7a__ndk_target_21/python2/Lib/zipfile.py", line 811, in _RealGetContents
03-05 12:37:31.035 15940 15954 I zn      : BadZipfile: File is not a zip file

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
mkg20001commented, Mar 12, 2019

Using python2 currently isn’t an option, but upstream zeronet https://github.com/HelloZeroNet/ZeroNet/issues/1773 plans to upgrade in the future, so we’ll simply be stuck on 1.2.2 until py3 is ready

Will try once that is done

0reactions
mkg20001commented, Aug 6, 2019

Once we get that out of the way, we’ll know which stacktrace to analyze next

Read more comments on GitHub >

github_iconTop Results From Across the Web

"BadZipFile: File is not a zip file" - Error popped up all of a ...
Excel XLSX files are zipped, XLS files are not. I believe this bug is related to a combination of. XLS is not zipped,...
Read more >
python 3.9 and opepyxl : Error "zipfile.BadZipFile: File is not a ...
Running the function below I get the error "zipfile.BadZipFile: File is not a zip file". How should I fix the code in order...
Read more >
zipfile.BadZipFile: File is not a zip file - solved - Prodigy Support
I tried to install prodigy, unfortunately, I have this error in below, I am using windows 10, Python 3.7. pip is updated and...
Read more >
How to append list values to list of dictionary with the same ...
You could use zip to iterate in parallel over both lists: states = ['California', 'Colorado', 'Connecticut'] ds = [{'abbrev': 'CA', 'slug': 'ca'}, ...
Read more >
python之模块- 随风9 - 博客园
如:os 是系统相关的模块;file是文件操作相关的模块 ... File most likely does not exist ... raise BadZipfile, "File is not a zip file"
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found