gpt4 book ai didi

python - OSError : . pynative/...:文件太短

转载 作者:太空宇宙 更新时间:2023-11-03 16:04:13 27 4
gpt4 key购买 nike

当我尝试将 OCRopus(基于 python 的 OCR 工具)应用于 TIFF 图像时,出现以下 python 错误:

    Traceback (most recent call last):
File "/usr/local/bin/ocropus-nlbin", line 10, in <module>
import ocrolib
File "/usr/local/lib/python2.7/dist-packages/ocrolib/__init__.py", line 12, in <module>
from common import *
File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", line 18, in <module>
import lstm
File "/usr/local/lib/python2.7/dist-packages/ocrolib/lstm.py", line 32, in <module>
import nutils
File "/usr/local/lib/python2.7/dist-packages/ocrolib/nutils.py", line 25, in <module>
lstm_native = compile_and_load(lstm_utils)
File "/usr/local/lib/python2.7/dist-packages/ocrolib/native.py", line 68, in compile_and_load
return ctypes.CDLL(path)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: .pynative/cccd32009099f8dade0fe6cd205bf188.so: file too short
Traceback (most recent call last):
File "/usr/local/bin/ocropus-gpageseg", line 22, in <module>
import ocrolib
File "/usr/local/lib/python2.7/dist-packages/ocrolib/__init__.py", line 12, in <module>
from common import *
File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", line 18, in <module>
import lstm
File "/usr/local/lib/python2.7/dist-packages/ocrolib/lstm.py", line 32, in <module>
import nutils
File "/usr/local/lib/python2.7/dist-packages/ocrolib/nutils.py", line 25, in <module>
lstm_native = compile_and_load(lstm_utils)
File "/usr/local/lib/python2.7/dist-packages/ocrolib/native.py", line 68, in compile_and_load
return ctypes.CDLL(path)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: .pynative/cccd32009099f8dade0fe6cd205bf188.so: file too short
Traceback (most recent call last):
File "/usr/local/bin/ocropus-rpred", line 7, in <module>
import ocrolib
File "/usr/local/lib/python2.7/dist-packages/ocrolib/__init__.py", line 12, in <module>
from common import *
File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", line 18, in <module>
import lstm
File "/usr/local/lib/python2.7/dist-packages/ocrolib/lstm.py", line 32, in <module>
import nutils
File "/usr/local/lib/python2.7/dist-packages/ocrolib/nutils.py", line 25, in <module>
lstm_native = compile_and_load(lstm_utils)
File "/usr/local/lib/python2.7/dist-packages/ocrolib/native.py", line 68, in compile_and_load
return ctypes.CDLL(path)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: .pynative/cccd32009099f8dade0fe6cd205bf188.so: file too short
Traceback (most recent call last):
File "/usr/local/bin/ocropus-hocr", line 8, in <module>
import ocrolib
File "/usr/local/lib/python2.7/dist-packages/ocrolib/__init__.py", line 12, in <module>
from common import *
File "/usr/local/lib/python2.7/dist-packages/ocrolib/common.py", line 18, in <module>
import lstm
File "/usr/local/lib/python2.7/dist-packages/ocrolib/lstm.py", line 32, in <module>
import nutils
File "/usr/local/lib/python2.7/dist-packages/ocrolib/nutils.py", line 25, in <module>
lstm_native = compile_and_load(lstm_utils)
File "/usr/local/lib/python2.7/dist-packages/ocrolib/native.py", line 68, in compile_and_load
return ctypes.CDLL(path)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: .pynative/cccd32009099f8dade0fe6cd205bf188.so: file too short

由于这是 python 问题,我没有标记 OCROpus,我应该也标记它吗?难道是Python安装的问题?如果是这样,我该如何解决?

最佳答案

问题已解决。我看到其他人(在不同的问题上)遇到了麻烦:

OSError:[X]... : file too short

我的建议是:无论你在做什么,检查当前目录中是否有名为[X]的隐藏目录并将其删除。

关于python - OSError : . pynative/...:文件太短,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40009710/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com