hwj.log 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884
  1. INFO 2019-10-17 10:11:05,598 basehttp 124 "GET /areas/ HTTP/1.1" 200 10
  2. INFO 2019-10-17 13:26:27,171 autoreload 597 Watching for file changes with StatReloader
  3. INFO 2019-10-17 13:27:09,435 autoreload 217 E:\12446\PycharmProjects\wangli\wanjia\awj\awj\setting\dev.py changed, reloading.
  4. INFO 2019-10-17 13:27:10,260 autoreload 597 Watching for file changes with StatReloader
  5. INFO 2019-10-17 13:27:35,090 autoreload 217 E:\12446\PycharmProjects\wangli\wanjia\awj\awj\setting\dev.py changed, reloading.
  6. INFO 2019-10-17 13:27:35,938 autoreload 597 Watching for file changes with StatReloader
  7. INFO 2019-10-17 13:28:06,660 autoreload 597 Watching for file changes with StatReloader
  8. INFO 2019-10-17 13:28:39,906 autoreload 597 Watching for file changes with StatReloader
  9. WARNING 2019-10-17 14:12:35,299 log 228 Not Found: /areas/
  10. WARNING 2019-10-17 14:12:35,300 basehttp 154 "GET /areas/ HTTP/1.1" 404 1955
  11. WARNING 2019-10-17 14:12:37,216 log 228 Not Found: /areas/
  12. WARNING 2019-10-17 14:12:37,216 basehttp 154 "GET /areas/ HTTP/1.1" 404 1955
  13. INFO 2019-10-17 14:15:22,231 basehttp 154 "GET /areas/ HTTP/1.1" 200 10
  14. INFO 2019-10-17 14:15:45,505 basehttp 154 "GET /areas/ HTTP/1.1" 200 10
  15. ERROR 2019-10-17 14:21:46,626 log 228 Internal Server Error: /areas/
  16. Traceback (most recent call last):
  17. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  18. response = get_response(request)
  19. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  20. response = self.process_exception_by_middleware(e, request)
  21. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  22. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  23. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  24. return self.dispatch(request, *args, **kwargs)
  25. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  26. return handler(request, *args, **kwargs)
  27. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 11, in get
  28. with connection.cursor() as cursor:
  29. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  30. return self._cursor()
  31. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  32. self.ensure_connection()
  33. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  34. self.connect()
  35. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  36. self.init_connection_state()
  37. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  38. "The database driver doesn't support modern datatime types.")
  39. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  40. ERROR 2019-10-17 14:21:46,628 basehttp 154 "GET /areas/ HTTP/1.1" 500 99869
  41. ERROR 2019-10-17 14:22:09,101 log 228 Internal Server Error: /areas/
  42. Traceback (most recent call last):
  43. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  44. response = get_response(request)
  45. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  46. response = self.process_exception_by_middleware(e, request)
  47. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  48. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  49. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  50. return self.dispatch(request, *args, **kwargs)
  51. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  52. return handler(request, *args, **kwargs)
  53. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 11, in get
  54. with connection.cursor() as cursor:
  55. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  56. return self._cursor()
  57. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  58. self.ensure_connection()
  59. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  60. self.connect()
  61. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  62. self.init_connection_state()
  63. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  64. "The database driver doesn't support modern datatime types.")
  65. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  66. ERROR 2019-10-17 14:22:09,103 basehttp 154 "GET /areas/ HTTP/1.1" 500 99864
  67. ERROR 2019-10-17 14:23:11,195 log 228 Internal Server Error: /areas/
  68. Traceback (most recent call last):
  69. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  70. response = get_response(request)
  71. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  72. response = self.process_exception_by_middleware(e, request)
  73. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  74. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  75. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  76. return self.dispatch(request, *args, **kwargs)
  77. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  78. return handler(request, *args, **kwargs)
  79. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 11, in get
  80. with connection.cursor() as cursor:
  81. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  82. return self._cursor()
  83. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  84. self.ensure_connection()
  85. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  86. self.connect()
  87. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  88. self.init_connection_state()
  89. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  90. "The database driver doesn't support modern datatime types.")
  91. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  92. ERROR 2019-10-17 14:23:11,197 basehttp 154 "GET /areas/ HTTP/1.1" 500 99866
  93. ERROR 2019-10-17 14:23:55,955 log 228 Internal Server Error: /areas/
  94. Traceback (most recent call last):
  95. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  96. response = get_response(request)
  97. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  98. response = self.process_exception_by_middleware(e, request)
  99. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  100. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  101. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  102. return self.dispatch(request, *args, **kwargs)
  103. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  104. return handler(request, *args, **kwargs)
  105. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 11, in get
  106. with connection.cursor() as cursor:
  107. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  108. return self._cursor()
  109. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  110. self.ensure_connection()
  111. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  112. self.connect()
  113. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  114. self.init_connection_state()
  115. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  116. "The database driver doesn't support modern datatime types.")
  117. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  118. ERROR 2019-10-17 14:23:55,957 basehttp 154 "GET /areas/ HTTP/1.1" 500 99876
  119. ERROR 2019-10-17 14:24:23,614 log 228 Internal Server Error: /areas/
  120. Traceback (most recent call last):
  121. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  122. response = get_response(request)
  123. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  124. response = self.process_exception_by_middleware(e, request)
  125. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  127. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  128. return self.dispatch(request, *args, **kwargs)
  129. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  130. return handler(request, *args, **kwargs)
  131. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 11, in get
  132. with connection.cursor() as cursor:
  133. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  134. return self._cursor()
  135. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  136. self.ensure_connection()
  137. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  138. self.connect()
  139. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  140. self.init_connection_state()
  141. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  142. "The database driver doesn't support modern datatime types.")
  143. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  144. ERROR 2019-10-17 14:24:23,615 basehttp 154 "GET /areas/ HTTP/1.1" 500 99876
  145. ERROR 2019-10-17 14:26:39,285 log 228 Internal Server Error: /areas/
  146. Traceback (most recent call last):
  147. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  148. response = get_response(request)
  149. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  150. response = self.process_exception_by_middleware(e, request)
  151. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  152. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  153. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  154. return self.dispatch(request, *args, **kwargs)
  155. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  156. return handler(request, *args, **kwargs)
  157. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 14, in get
  158. with connection.cursor() as cursor:
  159. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  160. return self._cursor()
  161. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  162. self.ensure_connection()
  163. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  164. self.connect()
  165. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  166. self.init_connection_state()
  167. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  168. "The database driver doesn't support modern datatime types.")
  169. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  170. ERROR 2019-10-17 14:26:39,287 basehttp 154 "GET /areas/ HTTP/1.1" 500 100119
  171. ERROR 2019-10-17 14:29:28,143 log 228 Internal Server Error: /areas/
  172. Traceback (most recent call last):
  173. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  174. response = get_response(request)
  175. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  176. response = self.process_exception_by_middleware(e, request)
  177. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  178. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  179. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  180. return self.dispatch(request, *args, **kwargs)
  181. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  182. return handler(request, *args, **kwargs)
  183. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 11, in get
  184. with connection.cursor() as cursor:
  185. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  186. return self._cursor()
  187. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  188. self.ensure_connection()
  189. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  190. self.connect()
  191. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  192. self.init_connection_state()
  193. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  194. "The database driver doesn't support modern datatime types.")
  195. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  196. ERROR 2019-10-17 14:29:28,145 basehttp 154 "GET /areas/ HTTP/1.1" 500 99876
  197. ERROR 2019-10-17 14:36:51,606 log 228 Internal Server Error: /areas/
  198. Traceback (most recent call last):
  199. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  200. response = get_response(request)
  201. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  202. response = self.process_exception_by_middleware(e, request)
  203. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  204. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  205. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  206. return self.dispatch(request, *args, **kwargs)
  207. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  208. return handler(request, *args, **kwargs)
  209. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 11, in get
  210. with connection.cursor() as cursor:
  211. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  212. return self._cursor()
  213. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  214. self.ensure_connection()
  215. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  216. self.connect()
  217. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  218. self.init_connection_state()
  219. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  220. "The database driver doesn't support modern datatime types.")
  221. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  222. ERROR 2019-10-17 14:36:51,608 basehttp 154 "GET /areas/ HTTP/1.1" 500 99792
  223. ERROR 2019-10-17 14:38:25,722 log 228 Internal Server Error: /areas/
  224. Traceback (most recent call last):
  225. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  226. response = get_response(request)
  227. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  228. response = self.process_exception_by_middleware(e, request)
  229. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  230. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  231. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  232. return self.dispatch(request, *args, **kwargs)
  233. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  234. return handler(request, *args, **kwargs)
  235. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 12, in get
  236. cursor = connection.cursor()
  237. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  238. return self._cursor()
  239. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  240. self.ensure_connection()
  241. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  242. self.connect()
  243. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  244. self.init_connection_state()
  245. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  246. "The database driver doesn't support modern datatime types.")
  247. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  248. ERROR 2019-10-17 14:38:25,723 basehttp 154 "GET /areas/ HTTP/1.1" 500 99949
  249. ERROR 2019-10-17 14:44:01,821 log 228 Internal Server Error: /areas/
  250. Traceback (most recent call last):
  251. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  252. response = get_response(request)
  253. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  254. response = self.process_exception_by_middleware(e, request)
  255. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  256. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  257. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  258. return self.dispatch(request, *args, **kwargs)
  259. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  260. return handler(request, *args, **kwargs)
  261. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 12, in get
  262. cursor = connection.cursor()
  263. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  264. return self._cursor()
  265. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  266. self.ensure_connection()
  267. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  268. self.connect()
  269. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  270. self.init_connection_state()
  271. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  272. "The database driver doesn't support modern datatime types.")
  273. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  274. ERROR 2019-10-17 14:44:01,823 basehttp 154 "GET /areas/ HTTP/1.1" 500 99949
  275. ERROR 2019-10-17 14:46:00,691 log 228 Internal Server Error: /areas/
  276. Traceback (most recent call last):
  277. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  278. response = get_response(request)
  279. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  280. response = self.process_exception_by_middleware(e, request)
  281. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  282. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  283. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  284. return self.dispatch(request, *args, **kwargs)
  285. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  286. return handler(request, *args, **kwargs)
  287. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 11, in get
  288. with connection.cursor() as cursor:
  289. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 255, in cursor
  290. return self._cursor()
  291. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 232, in _cursor
  292. self.ensure_connection()
  293. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 216, in ensure_connection
  294. self.connect()
  295. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\base\base.py", line 196, in connect
  296. self.init_connection_state()
  297. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 365, in init_connection_state
  298. "The database driver doesn't support modern datatime types.")
  299. django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
  300. ERROR 2019-10-17 14:46:00,693 basehttp 154 "GET /areas/ HTTP/1.1" 500 100396
  301. WARNING 2019-10-17 14:46:00,830 log 228 Not Found: /favicon.ico
  302. WARNING 2019-10-17 14:46:00,832 basehttp 154 "GET /favicon.ico HTTP/1.1" 404 2126
  303. INFO 2019-10-17 14:48:52,834 basehttp 154 "GET /areas/ HTTP/1.1" 200 10
  304. INFO 2019-10-17 14:52:36,899 basehttp 154 "GET /areas/ HTTP/1.1" 200 10
  305. INFO 2019-10-17 16:21:08,859 basehttp 154 "GET /areas/ HTTP/1.1" 200 10
  306. WARNING 2019-10-17 17:33:38,727 log 228 Forbidden (CSRF cookie not set.): /areas/
  307. WARNING 2019-10-17 17:33:38,727 basehttp 154 "POST /areas/ HTTP/1.1" 403 2868
  308. INFO 2019-10-17 17:33:42,872 basehttp 154 "GET /areas/ HTTP/1.1" 200 10
  309. INFO 2019-10-17 17:34:25,001 basehttp 154 "GET /invoice/ HTTP/1.1" 200 10
  310. WARNING 2019-10-17 17:40:06,205 log 228 Forbidden (CSRF cookie not set.): /invoice/
  311. WARNING 2019-10-17 17:40:06,206 basehttp 154 "POST /invoice/ HTTP/1.1" 403 2868
  312. ERROR 2019-10-17 17:40:59,373 log 228 Internal Server Error: /invoice/
  313. Traceback (most recent call last):
  314. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  315. response = get_response(request)
  316. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 137, in _get_response
  317. "returned None instead." % (callback.__module__, view_name)
  318. ValueError: The view stockinvoice.views.InvoiceView didn't return an HttpResponse object. It returned None instead.
  319. ERROR 2019-10-17 17:40:59,374 basehttp 154 "POST /invoice/ HTTP/1.1" 500 61366
  320. INFO 2019-10-17 17:42:00,134 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  321. ERROR 2019-10-17 17:44:11,957 log 228 Internal Server Error: /invoice/
  322. Traceback (most recent call last):
  323. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  324. return func(*args, **kwargs)
  325. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 581, in fetchone
  326. row = self.cursor.fetchone()
  327. pyodbc.ProgrammingError: No results. Previous SQL was not a query.
  328. The above exception was the direct cause of the following exception:
  329. Traceback (most recent call last):
  330. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  331. response = get_response(request)
  332. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  333. response = self.process_exception_by_middleware(e, request)
  334. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  335. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  336. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  337. return self.dispatch(request, *args, **kwargs)
  338. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  339. return handler(request, *args, **kwargs)
  340. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 14, in get
  341. row = cursor.fetchone()
  342. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  343. return func(*args, **kwargs)
  344. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  345. raise dj_exc_value.with_traceback(traceback) from exc_value
  346. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  347. return func(*args, **kwargs)
  348. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 581, in fetchone
  349. row = self.cursor.fetchone()
  350. django.db.utils.ProgrammingError: No results. Previous SQL was not a query.
  351. ERROR 2019-10-17 17:44:11,959 basehttp 154 "GET /invoice/ HTTP/1.1" 500 102978
  352. ERROR 2019-10-17 17:45:20,027 log 228 Internal Server Error: /invoice/
  353. Traceback (most recent call last):
  354. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  355. return func(*args, **kwargs)
  356. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 581, in fetchone
  357. row = self.cursor.fetchone()
  358. pyodbc.ProgrammingError: No results. Previous SQL was not a query.
  359. The above exception was the direct cause of the following exception:
  360. Traceback (most recent call last):
  361. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  362. response = get_response(request)
  363. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  364. response = self.process_exception_by_middleware(e, request)
  365. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  366. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  367. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  368. return self.dispatch(request, *args, **kwargs)
  369. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  370. return handler(request, *args, **kwargs)
  371. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 14, in get
  372. row = cursor.fetchone()
  373. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  374. return func(*args, **kwargs)
  375. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  376. raise dj_exc_value.with_traceback(traceback) from exc_value
  377. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  378. return func(*args, **kwargs)
  379. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 581, in fetchone
  380. row = self.cursor.fetchone()
  381. django.db.utils.ProgrammingError: No results. Previous SQL was not a query.
  382. ERROR 2019-10-17 17:45:20,028 basehttp 154 "GET /invoice/ HTTP/1.1" 500 103115
  383. INFO 2019-10-17 17:45:40,818 basehttp 154 "GET /invoice/ HTTP/1.1" 200 10
  384. ERROR 2019-10-17 17:47:14,790 log 228 Internal Server Error: /invoice/
  385. Traceback (most recent call last):
  386. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  387. return func(*args, **kwargs)
  388. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 581, in fetchone
  389. row = self.cursor.fetchone()
  390. pyodbc.ProgrammingError: No results. Previous SQL was not a query.
  391. The above exception was the direct cause of the following exception:
  392. Traceback (most recent call last):
  393. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  394. response = get_response(request)
  395. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  396. response = self.process_exception_by_middleware(e, request)
  397. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  398. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  399. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  400. return self.dispatch(request, *args, **kwargs)
  401. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  402. return handler(request, *args, **kwargs)
  403. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 14, in get
  404. row = cursor.fetchone()
  405. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  406. return func(*args, **kwargs)
  407. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  408. raise dj_exc_value.with_traceback(traceback) from exc_value
  409. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  410. return func(*args, **kwargs)
  411. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 581, in fetchone
  412. row = self.cursor.fetchone()
  413. django.db.utils.ProgrammingError: No results. Previous SQL was not a query.
  414. ERROR 2019-10-17 17:47:14,792 basehttp 154 "GET /invoice/ HTTP/1.1" 500 103115
  415. ERROR 2019-10-17 17:47:52,312 log 228 Internal Server Error: /invoice/
  416. Traceback (most recent call last):
  417. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  418. return func(*args, **kwargs)
  419. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 581, in fetchone
  420. row = self.cursor.fetchone()
  421. pyodbc.ProgrammingError: No results. Previous SQL was not a query.
  422. The above exception was the direct cause of the following exception:
  423. Traceback (most recent call last):
  424. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  425. response = get_response(request)
  426. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  427. response = self.process_exception_by_middleware(e, request)
  428. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  429. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  430. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  431. return self.dispatch(request, *args, **kwargs)
  432. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  433. return handler(request, *args, **kwargs)
  434. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 14, in get
  435. row = cursor.fetchone()
  436. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  437. return func(*args, **kwargs)
  438. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  439. raise dj_exc_value.with_traceback(traceback) from exc_value
  440. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  441. return func(*args, **kwargs)
  442. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 581, in fetchone
  443. row = self.cursor.fetchone()
  444. django.db.utils.ProgrammingError: No results. Previous SQL was not a query.
  445. ERROR 2019-10-17 17:47:52,314 basehttp 154 "GET /invoice/ HTTP/1.1" 500 103117
  446. ERROR 2019-10-17 17:52:52,408 log 228 Internal Server Error: /invoice/
  447. Traceback (most recent call last):
  448. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  449. return func(*args, **kwargs)
  450. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 594, in fetchall
  451. return self.format_rows(self.cursor.fetchall())
  452. pyodbc.ProgrammingError: No results. Previous SQL was not a query.
  453. The above exception was the direct cause of the following exception:
  454. Traceback (most recent call last):
  455. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  456. response = get_response(request)
  457. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  458. response = self.process_exception_by_middleware(e, request)
  459. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  460. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  461. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  462. return self.dispatch(request, *args, **kwargs)
  463. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  464. return handler(request, *args, **kwargs)
  465. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 14, in get
  466. row = cursor.fetchall()
  467. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  468. return func(*args, **kwargs)
  469. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  470. raise dj_exc_value.with_traceback(traceback) from exc_value
  471. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 96, in inner
  472. return func(*args, **kwargs)
  473. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 594, in fetchall
  474. return self.format_rows(self.cursor.fetchall())
  475. django.db.utils.ProgrammingError: No results. Previous SQL was not a query.
  476. ERROR 2019-10-17 17:52:52,409 basehttp 154 "GET /invoice/ HTTP/1.1" 500 102677
  477. INFO 2019-10-17 17:59:44,327 basehttp 154 "GET /invoice/ HTTP/1.1" 200 10
  478. INFO 2019-10-17 18:00:03,991 basehttp 154 "GET /invoice/ HTTP/1.1" 200 10
  479. INFO 2019-10-17 18:01:04,025 basehttp 154 "GET /invoice/ HTTP/1.1" 200 10
  480. INFO 2019-10-17 18:01:52,909 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  481. ERROR 2019-10-17 18:03:36,505 log 228 Internal Server Error: /invoice/
  482. Traceback (most recent call last):
  483. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 83, in _execute
  484. return self.cursor.execute(sql)
  485. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  486. return self.cursor.execute(sql, params)
  487. pyodbc.ProgrammingError: ('42S22', "[42S22] [Microsoft][SQL Server Native Client 10.0][SQL Server]列名 'CUS_NO' 无效。 (207) (SQLExecDirectW)")
  488. The above exception was the direct cause of the following exception:
  489. Traceback (most recent call last):
  490. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  491. response = get_response(request)
  492. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  493. response = self.process_exception_by_middleware(e, request)
  494. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  495. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  496. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  497. return self.dispatch(request, *args, **kwargs)
  498. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  499. return handler(request, *args, **kwargs)
  500. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 12, in get
  501. cursor.execute("INSERT INTO PRDT(CUS_NO,NAME)VALUES ('QQ12345','DSDADADA')")
  502. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  503. return super().execute(sql, params)
  504. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  505. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  506. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  507. return executor(sql, params, many, context)
  508. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  509. return self.cursor.execute(sql, params)
  510. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  511. raise dj_exc_value.with_traceback(traceback) from exc_value
  512. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 83, in _execute
  513. return self.cursor.execute(sql)
  514. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  515. return self.cursor.execute(sql, params)
  516. django.db.utils.ProgrammingError: ('42S22', "[42S22] [Microsoft][SQL Server Native Client 10.0][SQL Server]列名 'CUS_NO' 无效。 (207) (SQLExecDirectW)")
  517. ERROR 2019-10-17 18:03:36,507 basehttp 154 "GET /invoice/ HTTP/1.1" 500 119454
  518. ERROR 2019-10-17 18:04:03,824 log 228 Internal Server Error: /invoice/
  519. Traceback (most recent call last):
  520. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 83, in _execute
  521. return self.cursor.execute(sql)
  522. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  523. return self.cursor.execute(sql, params)
  524. pyodbc.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]'`' 附近有语法错误。 (102) (SQLExecDirectW)")
  525. The above exception was the direct cause of the following exception:
  526. Traceback (most recent call last):
  527. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  528. response = get_response(request)
  529. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  530. response = self.process_exception_by_middleware(e, request)
  531. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  532. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  533. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  534. return self.dispatch(request, *args, **kwargs)
  535. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  536. return handler(request, *args, **kwargs)
  537. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 12, in get
  538. cursor.execute("INSERT INTO PRDT(CUS_NO,`NAME`)VALUES ('QQ12345','DSDADADA')")
  539. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  540. return super().execute(sql, params)
  541. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  542. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  543. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  544. return executor(sql, params, many, context)
  545. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  546. return self.cursor.execute(sql, params)
  547. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  548. raise dj_exc_value.with_traceback(traceback) from exc_value
  549. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 83, in _execute
  550. return self.cursor.execute(sql)
  551. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  552. return self.cursor.execute(sql, params)
  553. django.db.utils.ProgrammingError: ('42000', "[42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]'`' 附近有语法错误。 (102) (SQLExecDirectW)")
  554. ERROR 2019-10-17 18:04:03,825 basehttp 154 "GET /invoice/ HTTP/1.1" 500 119498
  555. ERROR 2019-10-17 18:05:23,538 log 228 Internal Server Error: /invoice/
  556. Traceback (most recent call last):
  557. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 83, in _execute
  558. return self.cursor.execute(sql)
  559. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  560. return self.cursor.execute(sql, params)
  561. pyodbc.ProgrammingError: ('42S22', "[42S22] [Microsoft][SQL Server Native Client 10.0][SQL Server]列名 'CUS_NO' 无效。 (207) (SQLExecDirectW)")
  562. The above exception was the direct cause of the following exception:
  563. Traceback (most recent call last):
  564. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  565. response = get_response(request)
  566. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  567. response = self.process_exception_by_middleware(e, request)
  568. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  569. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  570. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  571. return self.dispatch(request, *args, **kwargs)
  572. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  573. return handler(request, *args, **kwargs)
  574. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 12, in get
  575. cursor.execute("INSERT INTO PRDT(CUS_NO,[NAME])VALUES ('QQ12345','DSDADADA')")
  576. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  577. return super().execute(sql, params)
  578. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  579. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  580. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  581. return executor(sql, params, many, context)
  582. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  583. return self.cursor.execute(sql, params)
  584. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  585. raise dj_exc_value.with_traceback(traceback) from exc_value
  586. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 83, in _execute
  587. return self.cursor.execute(sql)
  588. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  589. return self.cursor.execute(sql, params)
  590. django.db.utils.ProgrammingError: ('42S22', "[42S22] [Microsoft][SQL Server Native Client 10.0][SQL Server]列名 'CUS_NO' 无效。 (207) (SQLExecDirectW)")
  591. ERROR 2019-10-17 18:05:23,540 basehttp 154 "GET /invoice/ HTTP/1.1" 500 119474
  592. ERROR 2019-10-17 18:06:14,326 log 228 Internal Server Error: /invoice/
  593. Traceback (most recent call last):
  594. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  595. return self.cursor.execute(sql, params)
  596. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  597. return self.cursor.execute(sql, params)
  598. pyodbc.ProgrammingError: ('42S22', "[42S22] [Microsoft][SQL Server Native Client 10.0][SQL Server]列名 'CUS_NO' 无效。 (207) (SQLExecDirectW); [42S22] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
  599. The above exception was the direct cause of the following exception:
  600. Traceback (most recent call last):
  601. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  602. response = get_response(request)
  603. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  604. response = self.process_exception_by_middleware(e, request)
  605. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  606. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  607. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  608. return self.dispatch(request, *args, **kwargs)
  609. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  610. return handler(request, *args, **kwargs)
  611. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 12, in get
  612. cursor.execute("INSERT INTO PRDT(CUS_NO,[NAME])VALUES ('QQ12345',%s)",[a])
  613. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  614. return super().execute(sql, params)
  615. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  616. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  617. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  618. return executor(sql, params, many, context)
  619. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  620. return self.cursor.execute(sql, params)
  621. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  622. raise dj_exc_value.with_traceback(traceback) from exc_value
  623. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  624. return self.cursor.execute(sql, params)
  625. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  626. return self.cursor.execute(sql, params)
  627. django.db.utils.ProgrammingError: ('42S22', "[42S22] [Microsoft][SQL Server Native Client 10.0][SQL Server]列名 'CUS_NO' 无效。 (207) (SQLExecDirectW); [42S22] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
  628. ERROR 2019-10-17 18:06:14,328 basehttp 154 "GET /invoice/ HTTP/1.1" 500 120137
  629. INFO 2019-10-17 18:06:36,521 basehttp 154 "GET /invoice/ HTTP/1.1" 200 10
  630. INFO 2019-10-17 21:27:12,877 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  631. INFO 2019-10-17 22:08:39,806 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  632. INFO 2019-10-17 22:11:55,840 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  633. INFO 2019-10-17 22:12:22,921 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  634. INFO 2019-10-17 22:12:43,199 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  635. INFO 2019-10-17 22:13:51,143 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  636. ERROR 2019-10-17 22:15:09,179 log 228 Internal Server Error: /invoice/
  637. Traceback (most recent call last):
  638. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  639. return self.cursor.execute(sql, params)
  640. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  641. return self.cursor.execute(sql, params)
  642. pyodbc.ProgrammingError: ('42S02', "[42S02] [Microsoft][SQL Server Native Client 10.0][SQL Server]对象名 'SLAM' 无效。 (208) (SQLExecDirectW); [42S02] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
  643. The above exception was the direct cause of the following exception:
  644. Traceback (most recent call last):
  645. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  646. response = get_response(request)
  647. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  648. response = self.process_exception_by_middleware(e, request)
  649. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  650. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  651. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  652. return self.dispatch(request, *args, **kwargs)
  653. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  654. return handler(request, *args, **kwargs)
  655. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 54, in post
  656. row_usr = cursor.execute("SELECT COUNT(*) FROM SLAM WHERE CUS_NO=%s",[USR]).fetchall()[0][0]
  657. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  658. return super().execute(sql, params)
  659. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  660. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  661. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  662. return executor(sql, params, many, context)
  663. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  664. return self.cursor.execute(sql, params)
  665. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  666. raise dj_exc_value.with_traceback(traceback) from exc_value
  667. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  668. return self.cursor.execute(sql, params)
  669. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  670. return self.cursor.execute(sql, params)
  671. django.db.utils.ProgrammingError: ('42S02', "[42S02] [Microsoft][SQL Server Native Client 10.0][SQL Server]对象名 'SLAM' 无效。 (208) (SQLExecDirectW); [42S02] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
  672. ERROR 2019-10-17 22:15:09,183 basehttp 154 "POST /invoice/ HTTP/1.1" 500 124347
  673. ERROR 2019-10-17 22:15:33,723 log 228 Internal Server Error: /invoice/
  674. Traceback (most recent call last):
  675. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  676. return self.cursor.execute(sql, params)
  677. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  678. return self.cursor.execute(sql, params)
  679. pyodbc.ProgrammingError: ('42S02', "[42S02] [Microsoft][SQL Server Native Client 10.0][SQL Server]对象名 'SLAM' 无效。 (208) (SQLExecDirectW); [42S02] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
  680. The above exception was the direct cause of the following exception:
  681. Traceback (most recent call last):
  682. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  683. response = get_response(request)
  684. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  685. response = self.process_exception_by_middleware(e, request)
  686. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  687. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  688. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  689. return self.dispatch(request, *args, **kwargs)
  690. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  691. return handler(request, *args, **kwargs)
  692. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 54, in post
  693. row_usr = cursor.execute("SELECT COUNT(*) FROM SLAM WHERE SAL_NO=%s",[USR]).fetchall()[0][0]
  694. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  695. return super().execute(sql, params)
  696. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  697. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  698. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  699. return executor(sql, params, many, context)
  700. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  701. return self.cursor.execute(sql, params)
  702. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  703. raise dj_exc_value.with_traceback(traceback) from exc_value
  704. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  705. return self.cursor.execute(sql, params)
  706. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  707. return self.cursor.execute(sql, params)
  708. django.db.utils.ProgrammingError: ('42S02', "[42S02] [Microsoft][SQL Server Native Client 10.0][SQL Server]对象名 'SLAM' 无效。 (208) (SQLExecDirectW); [42S02] [Microsoft][SQL Server Native Client 10.0][SQL Server]无法预定义语句。 (8180)")
  709. ERROR 2019-10-17 22:15:33,727 basehttp 154 "POST /invoice/ HTTP/1.1" 500 124350
  710. INFO 2019-10-17 22:16:30,085 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  711. INFO 2019-10-17 22:19:35,485 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  712. INFO 2019-10-17 22:19:41,014 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  713. INFO 2019-10-17 22:22:30,127 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  714. INFO 2019-10-17 22:22:32,199 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  715. INFO 2019-10-17 22:31:58,427 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  716. INFO 2019-10-17 22:32:25,280 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  717. INFO 2019-10-17 22:32:37,349 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  718. INFO 2019-10-17 22:32:56,619 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  719. INFO 2019-10-17 22:34:21,074 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  720. INFO 2019-10-17 22:56:34,519 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  721. INFO 2019-10-17 22:57:58,780 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  722. INFO 2019-10-17 22:58:01,718 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  723. INFO 2019-10-17 22:58:30,375 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  724. INFO 2019-10-17 22:58:46,584 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  725. INFO 2019-10-17 22:59:12,091 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25
  726. WARNING 2019-10-17 23:07:47,139 log 228 Forbidden: /invoice/
  727. WARNING 2019-10-17 23:07:47,140 basehttp 154 "POST /invoice/ HTTP/1.1" 403 12
  728. ERROR 2019-10-17 23:14:23,137 log 228 Internal Server Error: /invoice/
  729. Traceback (most recent call last):
  730. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  731. return self.cursor.execute(sql, params)
  732. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  733. return self.cursor.execute(sql, params)
  734. pyodbc.IntegrityError: ('23000', "[23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]违反了 PRIMARY KEY 约束 'PK__MF_PSS'。不能在对象 'dbo.MF_PSS' 中插入重复键。 (2627) (SQLExecDirectW); [23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]语句已终止。 (3621)")
  735. The above exception was the direct cause of the following exception:
  736. Traceback (most recent call last):
  737. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  738. response = get_response(request)
  739. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  740. response = self.process_exception_by_middleware(e, request)
  741. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  742. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  743. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  744. return self.dispatch(request, *args, **kwargs)
  745. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  746. return handler(request, *args, **kwargs)
  747. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 75, in post
  748. datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT])
  749. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  750. return super().execute(sql, params)
  751. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  752. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  753. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  754. return executor(sql, params, many, context)
  755. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  756. return self.cursor.execute(sql, params)
  757. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  758. raise dj_exc_value.with_traceback(traceback) from exc_value
  759. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  760. return self.cursor.execute(sql, params)
  761. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  762. return self.cursor.execute(sql, params)
  763. django.db.utils.IntegrityError: ('23000', "[23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]违反了 PRIMARY KEY 约束 'PK__MF_PSS'。不能在对象 'dbo.MF_PSS' 中插入重复键。 (2627) (SQLExecDirectW); [23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]语句已终止。 (3621)")
  764. ERROR 2019-10-17 23:14:23,139 basehttp 154 "POST /invoice/ HTTP/1.1" 500 129497
  765. ERROR 2019-10-17 23:15:02,233 log 228 Internal Server Error: /invoice/
  766. Traceback (most recent call last):
  767. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  768. response = get_response(request)
  769. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  770. response = self.process_exception_by_middleware(e, request)
  771. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  772. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  773. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  774. return self.dispatch(request, *args, **kwargs)
  775. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  776. return handler(request, *args, **kwargs)
  777. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 78, in post
  778. VALUES('PC',%s,%s,'0000','AQ001',,1,1,%f,%f,5,1,1,%f)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT])
  779. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  780. return super().execute(sql, params)
  781. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  782. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  783. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  784. return executor(sql, params, many, context)
  785. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  786. return self.cursor.execute(sql, params)
  787. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 542, in execute
  788. sql = self.format_sql(sql, params)
  789. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 510, in format_sql
  790. sql = sql % tuple('?' * len(params))
  791. TypeError: must be real number, not str
  792. ERROR 2019-10-17 23:15:02,235 basehttp 154 "POST /invoice/ HTTP/1.1" 500 111057
  793. ERROR 2019-10-17 23:17:43,751 log 228 Internal Server Error: /invoice/
  794. Traceback (most recent call last):
  795. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  796. response = get_response(request)
  797. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  798. response = self.process_exception_by_middleware(e, request)
  799. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  800. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  801. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  802. return self.dispatch(request, *args, **kwargs)
  803. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  804. return handler(request, *args, **kwargs)
  805. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 78, in post
  806. VALUES('PC',%s,%s,'0000','AQ001',1,1,%f,%f,5,1,1,%f)""", ['PC'+ZL_NO[2::], datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT,AMT,AMT])
  807. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  808. return super().execute(sql, params)
  809. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  810. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  811. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  812. return executor(sql, params, many, context)
  813. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  814. return self.cursor.execute(sql, params)
  815. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 542, in execute
  816. sql = self.format_sql(sql, params)
  817. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 510, in format_sql
  818. sql = sql % tuple('?' * len(params))
  819. TypeError: must be real number, not str
  820. ERROR 2019-10-17 23:17:43,754 basehttp 154 "POST /invoice/ HTTP/1.1" 500 111047
  821. ERROR 2019-10-17 23:24:18,477 log 228 Internal Server Error: /invoice/
  822. Traceback (most recent call last):
  823. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  824. return self.cursor.execute(sql, params)
  825. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  826. return self.cursor.execute(sql, params)
  827. pyodbc.IntegrityError: ('23000', "[23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]违反了 PRIMARY KEY 约束 'PK__MF_PSS'。不能在对象 'dbo.MF_PSS' 中插入重复键。 (2627) (SQLExecDirectW); [23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]语句已终止。 (3621)")
  828. The above exception was the direct cause of the following exception:
  829. Traceback (most recent call last):
  830. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
  831. response = get_response(request)
  832. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
  833. response = self.process_exception_by_middleware(e, request)
  834. File "C:\Users\12446\Envs\awj\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
  835. response = wrapped_callback(request, *callback_args, **callback_kwargs)
  836. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 68, in view
  837. return self.dispatch(request, *args, **kwargs)
  838. File "C:\Users\12446\Envs\awj\lib\site-packages\django\views\generic\base.py", line 88, in dispatch
  839. return handler(request, *args, **kwargs)
  840. File "E:\12446\PycharmProjects\wangli\wanjia\awj\awj\apps\stockinvoice\views.py", line 75, in post
  841. datetime.datetime.strptime(LZ_DD, '%Y-%m-%d'),AMT])
  842. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 100, in execute
  843. return super().execute(sql, params)
  844. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 68, in execute
  845. return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  846. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
  847. return executor(sql, params, many, context)
  848. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  849. return self.cursor.execute(sql, params)
  850. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\utils.py", line 89, in __exit__
  851. raise dj_exc_value.with_traceback(traceback) from exc_value
  852. File "C:\Users\12446\Envs\awj\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
  853. return self.cursor.execute(sql, params)
  854. File "C:\Users\12446\Envs\awj\lib\site-packages\sql_server\pyodbc\base.py", line 546, in execute
  855. return self.cursor.execute(sql, params)
  856. django.db.utils.IntegrityError: ('23000', "[23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]违反了 PRIMARY KEY 约束 'PK__MF_PSS'。不能在对象 'dbo.MF_PSS' 中插入重复键。 (2627) (SQLExecDirectW); [23000] [Microsoft][SQL Server Native Client 10.0][SQL Server]语句已终止。 (3621)")
  857. ERROR 2019-10-17 23:24:18,480 basehttp 154 "POST /invoice/ HTTP/1.1" 500 129530
  858. INFO 2019-10-17 23:24:39,910 basehttp 154 "POST /invoice/ HTTP/1.1" 200 25