无法在AspNetUsers表中插入用户

时间:2016-06-12 12:35:28

标签: sql-server asp.net-mvc stored-procedures asp.net-identity

我正在尝试使用存储过程填充AspNetUsers表,但是我收到以下错误:

  

Msg 515,Level 16,State 2,Procedure Insert_Users,Line 36不能   将值NULL插入列' Id',表中   ' MyDatabase.dbo.AspNetUsers&#39 ;;列不允许空值。插入   失败。

我在其他一些帖子上看到列Id上应该有以下属性:[2016-06-12 14:11:53,609: ERROR/Worker-1] Process Worker-1 Traceback (most recent call last): File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/billiard/process.py", line 292, in _bootstrap self.run() File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/billiard/pool.py", line 292, in run self.after_fork() File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/billiard/pool.py", line 395, in after_fork self.initializer(*self.initargs) File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/celery/concurrency/prefork.py", line 84, in process_initializer signals.worker_process_init.send(sender=None) File "/Users/lutz/work/truncated/truncated-worker/venv/lib/python3.5/site-packages/celery/utils/dispatch/signal.py", line 166, in send response = receiver(signal=self, sender=sender, **named) TypeError: cassandra_init() got an unexpected keyword argument 'sender' ,但我无法找到物理声明的位置。

我不想手动插入所有用户,因为我没有时间,我需要尽快完成。

l = [
    {"paramA": ["valA1","valA2","valA3","valA4"]},
    {"paramB": ["valB1","valB2","valB3","valB4"]},
    {"paramC": ["valC1","valC2","valC3","valC4"]},
]

output = [dict([(line.keys()[0], line.values()[0][index]) for line in l]) for index in range(len(l[0].values()[0]))]

print(output)

1 个答案:

答案 0 :(得分:0)

你的WHILE循环中需要BEGIN-END。
否则它只是不为@id赋值而不处理循环