小编Che*_*art的帖子

Python(Pyramid框架)在请求之间保持数据,我无法弄清楚原因

我在第二次刷新页面时遇到以下错误:DetachedInstanceError:实例未绑定到Session; 属性刷新操作无法继续

DetachedInstanceError: Instance <MetadataRef at 0x107b2a0d0> is not bound to a Session; attribute refresh operation cannot proceed

 - Expression: "result.meta_refs(visible_search_only=True)"
 - Filename:   ... ects/WebApps/PYPanel/pypanel/templates/generic/search.pt
 - Location:   (line 45: col 38)
 - Source:     ... meta_ref result.meta_refs(visible_search_only=True)" tal:omi ...
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: {...} (0)
               renderer_name: templates/home.pt
               models: <list - at 0x1069e4d88>
               results: <list - at 0x107c30d40>
               renderer_info: <RendererHelper - at 0x1069b5650>
               active_models: <list - at 0x107b69050>
               query: 
               pagination: <NoneType - at 0x104dd5538>
               req: <Request - at 0x107b4e690>
               title: <NoneType - …
Run Code Online (Sandbox Code Playgroud)

python caching sqlalchemy python-2.7 chameleon

5
推荐指数
1
解决办法
316
查看次数

标签 统计

caching ×1

chameleon ×1

python ×1

python-2.7 ×1

sqlalchemy ×1