首页 > 解决方案 > Hunk #1 在 53 时失败

问题描述

我正在使用 python-for-android 在 python 脚本中创建一个 android 应用程序

在 pycharm 中创建应用程序时,我遇到了一些错误,甚至我不知道为什么会导致这些错误

[INFO]:    Prebuilding six for armeabi-v7a
[INFO]:    six has no prebuild_armeabi_v7a, skipping
[INFO]:    Prebuilding pyjnius for armeabi-v7a
[INFO]:    pyjnius has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for pyjnius[armeabi-v7a]
[INFO]:    Applying patch sdl2_jnienv_getter.patch
[INFO]:    -> running patch -t -d /home/veluvijay/.local/share/python-for-android/build/other_builds...(and 167 more)
           working: 1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej                                              Exception in thread background thread for pid 13494:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/veluvijay/envs/imagetotext/lib/python3.6/site-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/home/veluvijay/envs/imagetotext/lib/python3.6/site-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/veluvijay/envs/imagetotext/lib/python3.6/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /usr/bin/patch -t -d /home/veluvijay/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a/pyjnius -p1 -i /home/veluvijay/envs/imagetotext/lib/python3.6/site-packages/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch

  STDOUT:
patching file jnius/jnius_jvm_android.pxi
patching file setup.py
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej


  STDERR:

标签: pythonpython-3.xpython-requests

解决方案


修补文件 setup.py Hunk #1 FAILED at 53。

您的补丁文件导致错误,您可能需要删除或更改它。


推荐阅读