Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

FileNotFoundError: [Errno 2] No such file or directory #26

Open
AndreMiras opened this issue Mar 30, 2018 · 3 comments
Open

FileNotFoundError: [Errno 2] No such file or directory #26

AndreMiras opened this issue Mar 30, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@AndreMiras
Copy link
Owner

After compiling the Android apk on buildozer, the file is not found for the deployment.

buildozer android debug deploy run
...
[INFO]:    <- directory context /home/andre/demo/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    # Copying APK to current directory
[INFO]:    # Found APK file: /home/andre/demo/.buildozer/android/platform/build/dists/myapp/bin/MyApplication-0.1-debug.apk
[DEBUG]:   -> running cp /home/andre/demo/.buildozer/android/platform/build/dists/myapp/bin/MyApplication-0.1-debug.apk ./
b'Could not find hostpython, will not compile to .pyo (this is normal with python3)\nNo compiled python is present to zip, skipping.\nthis should only be the case if you are using the CrystaX python\n'Traceback (most recent call last):
  File "/home/andre/.local/bin/buildozer", line 11, in <module>
    load_entry_point('buildozer==0.34', 'console_scripts', 'buildozer')()
  File "/home/andre/.local/lib64/python3.5/site-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/home/andre/.local/lib64/python3.5/site-packages/buildozer/__init__.py", line 1058, in run_command
    self.target.run_commands(args)
  File "/home/andre/.local/lib64/python3.5/site-packages/buildozer/target.py", line 92, in run_commands
    func(args)
  File "/home/andre/.local/lib64/python3.5/site-packages/buildozer/target.py", line 104, in cmd_debug
    self.buildozer.build()
  File "/home/andre/.local/lib64/python3.5/site-packages/buildozer/__init__.py", line 212, in build
    self.target.build_package()
  File "/home/andre/.local/lib64/python3.5/site-packages/buildozer/targets/android.py", line 817, in build_package
    copyfile(join(apk_dir, apk), join(self.buildozer.bin_dir, apk_dest))
  File "/usr/lib64/python3.5/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/home/andre/demo/.buildozer/android/platform/build/dists/myapp/build/outputs/apk/myapp-debug.apk'

This is a known buildozer issue kivy/buildozer#312

@AndreMiras
Copy link
Owner Author

Applying proposed patch should fix it.
kivy/buildozer#312 (comment)
I'll leave the ticket open until this is fixed in buildozer so no manual patching is needed.

@AndreMiras
Copy link
Owner Author

The fix integrated to buildozer==0.34 may not fix it. See my comment to workaround it:
kivy/buildozer#599 (comment)

@AndreMiras AndreMiras added the bug Something isn't working label Apr 15, 2018
@AndreMiras
Copy link
Owner Author

Another comment related to the issue: kivy/buildozer@83ad94d#r29065648

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant