Tag: 搁置

在python搁置在Docker里的坏幻数

我有一个Python的搁置文件生成与Python 3.4和UTF-8编码。 该文件可以在主机上打开和正常访问。 当我访问Python中的文件:3.4 Docker容器时,我得到了 >>> shelve.open('data/countries.shelf') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.4/shelve.py", line 243, in open return DbfilenameShelf(filename, flag, protocol, writeback) File "/usr/local/lib/python3.4/shelve.py", line 227, in __init__ Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) File "/usr/local/lib/python3.4/dbm/__init__.py", line 94, in open return mod.open(file, flag, mode) _gdbm.error: Bad magic number 不pipe文件是绑定到容器还是在生成过程中实际复制,都没有什么区别,错误是一样的。 […]