Comments (6)
我没遇到哦, 在 本地, BAE, GAE, 本地GAE 我都试过啦
能看看BAE的log吗?
from me.
Error in dispatch_action:
Traceback (most recent call last):
File "instance0/codefs/jizhilong.duapp.com/ajax.py", line 908, in dispatch_action res = method(**parameters)
File "instance0/codefs/jizhilong.duapp.com/apis/common.py", line 228, in wrapper return method(*args, **kwargs)
File "instance0/codefs/jizhilong.duapp.com/ajax.py", line 458, in delete_post post.delete()
File "instance0/codefs/jizhilong.duapp.com/apis/common.py", line 542, in delete self.db_object.delete(commit=True)
File "instance0/codefs/jizhilong.duapp.com/model/model_bae.py", line 220, in delete self.commit()
File "instance0/codefs/jizhilong.duapp.com/model/model_bae.py", line 243, in commit db.session.commit()
File "instance0/pyruntime/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 113, in do return getattr(self.registry(), name)(*args, **kwargs)
File "instance0/pyruntime/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 655, in commit self.transaction.commit()
File "instance0/pyruntime/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 313, in commit self._prepare_impl()
File "instance0/pyruntime/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 297, in _prepare_impl self.session.flush()
File "instance0/pyruntime/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1559, in flush self._flush(objects)
File "instance0/pyruntime/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1630, in _flush flush_context.execute()
File "instance0/pyruntime/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 331, in execute rec.
from me.
我这里没法重现了
看起来是在删除post对应的stats的时候发现数据库里面没有相应的stats
你先检查一下你的数据库的db_stats表有什么异常
from me.
在bae提供的phpmyadmin里边试了下,先删除post,再删除相应的stat没有问题,反过来的话就会报跟lz给出的相同错误。
from me.
似乎由于某种原因,导致stat删除在先,post删除在后,而stat是post的外键,删除它会导致post指向一条不明确的stat记录。在phpadmin中执行如下代码,使得删除stat时,将指向它的post的_stat_id设置为null,可以暂时解决此问题:
ALTER TABLE `db_post`
DROP FOREIGN KEY `db_post_ibfk_1`;
ALTER TABLE `db_post`
ADD CONSTRAINT `db_post_ibfk_1` FOREIGN KEY (`_stats_id`)
REFERENCES `db_stats` (`id`) ON DELETE SET NULL;
from me.
已经更新了, 请试试这个版本
from me.
Related Issues (20)
- bae环境下删除报错 HOT 5
- 可以在linux vps上安装吗? HOT 1
- 换行问题 HOT 1
- 关于隐藏设置问题 HOT 3
- 使用七牛云存储上传图片错误 HOT 2
- 请问之后能否加入以下功能 HOT 1
- 给一个本地配置的教程呗 HOT 1
- 上传GAE后无法登陆 HOT 1
- 为什么按照配置SAE之后每次访问都会弹出svn认证弹窗 HOT 1
- New Feature写博客页面增加自动保存功能
- list模式下当分辨率width大于1887的时候,右侧列表自动窜到了左侧
- 在sae上无法新建文章? HOT 2
- BUG?新建类别之后不能编辑或删除吗? HOT 1
- 网站启用https的问题
- bae上部署失败啊
- twitter handle
- CCGen
- Tags not update when delete a post
- 亲,程序clone下后运行不了
- 当页面有较多图片时,会超级吃内存 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from me.