【发布时间】:2014-12-16 09:48:11
【问题描述】:
我目前正在尝试在谷歌应用引擎上使用 python 压缩一个大文件 (> 1GB),由于谷歌应用引擎对进程的内存缓存的限制,我使用了以下解决方案。 Create a zip file from a generator in Python?
当我在应用引擎上运行代码时,出现以下错误
Traceback (most recent call last):
File "/base/data/home/apps/s~whohasfiles/frontend.379535120592235032/gluon/restricted.py", line 212, in restricted
exec ccode in environment
File "/base/data/home/apps/s~whohasfiles/frontend.379535120592235032/applications/onefile/controllers/page.py", line 742, in <module>
File "/base/data/home/apps/s~whohasfiles/frontend.379535120592235032/gluon/globals.py", line 194, in <lambda>
self._caller = lambda f: f()
File "/base/data/home/apps/s~whohasfiles/frontend.379535120592235032/applications/onefile/controllers/page.py", line 673, in download
zip_response = page_store.gcs_zip_page(page, visitor)
File "applications/onefile/modules/page_store.py", line 339, in gcs_zip_page
w = z.start_entry(ZipInfo('%s-%s' %(file.created_on, file.name) ))
File "applications/onefile/modules/page_store.py", line 481, in start_entry
r, w = os.pipe()
OSError: [Errno 38] Function not implemented
google 应用引擎不支持 OS.pipe() 函数吗? 请问我该如何解决?
【问题讨论】:
标签: python google-app-engine python-2.7 google-cloud-storage