为什么我不能在 heroku 中使用这个架子?

问题描述

为什么我不能在heroku中使用它? 我使用了 Gunicorn 服务器。

import shelve

s = shelve.open("test")
s['flag'] = {}
temp = s['flag']
temp['foo'] = 'bar'
s['flag'] = temp

错误

2021-01-25T11:58:25.149375+00:00 app[web.1]:     return self.view_functions[rule.endpoint](**req.view_args)
2021-01-25T11:58:25.149376+00:00 app[web.1]:   File "/app/main.py",line 87,in selectGroupView
2021-01-25T11:58:25.149376+00:00 app[web.1]:     log('After Clicking Select' + str(s['flagSelectGroup']))
2021-01-25T11:58:25.149377+00:00 app[web.1]:   File "/app/.heroku/python/lib/python3.6/shelve.py",line 114,in __getitem__
2021-01-25T11:58:25.149377+00:00 app[web.1]:     value = Unpickler(f).load()
2021-01-25T11:58:25.149386+00:00 app[web.1]: _pickle.UnpicklingError: pickle data was truncated

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)