Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.32 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>ValueError: cannot set a frame with no defined index and a scalar // Werkzeug Debugger</title>
  6. <link rel="stylesheet" href="?__debugger__=yes&amp;cmd=resource&amp;f=style.css"
  7. type="text/css">
  8. <!-- We need to make sure this has a favicon so that the debugger does
  9. not by accident trigger a request to /favicon.ico which might
  10. change the application state. -->
  11. <link rel="shortcut icon"
  12. href="?__debugger__=yes&amp;cmd=resource&amp;f=console.png">
  13. <script src="?__debugger__=yes&amp;cmd=resource&amp;f=jquery.js"></script>
  14. <script src="?__debugger__=yes&amp;cmd=resource&amp;f=debugger.js"></script>
  15. <script type="text/javascript">
  16. var TRACEBACK = 139843316001032,
  17. CONSOLE_MODE = false,
  18. EVALEX = true,
  19. EVALEX_TRUSTED = false,
  20. SECRET = "F34rfglVmTqeRTV61pDg";
  21. </script>
  22. </head>
  23. <body style="background-color: #fff">
  24. <div class="debugger">
  25. <h1>ValueError</h1>
  26. <div class="detail">
  27. <p class="errormsg">ValueError: cannot set a frame with no defined index and a scalar</p>
  28. </div>
  29. <h2 class="traceback">Traceback <em>(most recent call last)</em></h2>
  30. <div class="traceback">
  31.  
  32. <ul><li><div class="frame" id="frame-139843316001256">
  33. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py"</cite>,
  34. line <em class="line">2328</em>,
  35. in <code class="function">__call__</code></h4>
  36. <div class="source library"><pre class="line before"><span class="ws"></span> </pre>
  37. <pre class="line before"><span class="ws"> </span>def __call__(self, environ, start_response):</pre>
  38. <pre class="line before"><span class="ws"> </span>&quot;&quot;&quot;The WSGI server calls the Flask application object as the</pre>
  39. <pre class="line before"><span class="ws"> </span>WSGI application. This calls :meth:`wsgi_app` which can be</pre>
  40. <pre class="line before"><span class="ws"> </span>wrapped to applying middleware.&quot;&quot;&quot;</pre>
  41. <pre class="line current"><span class="ws"> </span>return self.wsgi_app(environ, start_response)</pre>
  42. <pre class="line after"><span class="ws"></span> </pre>
  43. <pre class="line after"><span class="ws"> </span>def __repr__(self):</pre>
  44. <pre class="line after"><span class="ws"> </span>return '&lt;%s %r&gt;' % (</pre>
  45. <pre class="line after"><span class="ws"> </span>self.__class__.__name__,</pre>
  46. <pre class="line after"><span class="ws"> </span>self.name,</pre></div>
  47. </div>
  48.  
  49. <li><div class="frame" id="frame-139843315999408">
  50. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py"</cite>,
  51. line <em class="line">2314</em>,
  52. in <code class="function">wsgi_app</code></h4>
  53. <div class="source library"><pre class="line before"><span class="ws"> </span>try:</pre>
  54. <pre class="line before"><span class="ws"> </span>ctx.push()</pre>
  55. <pre class="line before"><span class="ws"> </span>response = self.full_dispatch_request()</pre>
  56. <pre class="line before"><span class="ws"> </span>except Exception as e:</pre>
  57. <pre class="line before"><span class="ws"> </span>error = e</pre>
  58. <pre class="line current"><span class="ws"> </span>response = self.handle_exception(e)</pre>
  59. <pre class="line after"><span class="ws"> </span>except:</pre>
  60. <pre class="line after"><span class="ws"> </span>error = sys.exc_info()[1]</pre>
  61. <pre class="line after"><span class="ws"> </span>raise</pre>
  62. <pre class="line after"><span class="ws"> </span>return response(environ, start_response)</pre>
  63. <pre class="line after"><span class="ws"> </span>finally:</pre></div>
  64. </div>
  65.  
  66. <li><div class="frame" id="frame-139843315999576">
  67. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py"</cite>,
  68. line <em class="line">1760</em>,
  69. in <code class="function">handle_exception</code></h4>
  70. <div class="source library"><pre class="line before"><span class="ws"> </span># if we want to repropagate the exception, we can attempt to</pre>
  71. <pre class="line before"><span class="ws"> </span># raise it with the whole traceback in case we can do that</pre>
  72. <pre class="line before"><span class="ws"> </span># (the function was actually called from the except part)</pre>
  73. <pre class="line before"><span class="ws"> </span># otherwise, we just raise the error again</pre>
  74. <pre class="line before"><span class="ws"> </span>if exc_value is e:</pre>
  75. <pre class="line current"><span class="ws"> </span>reraise(exc_type, exc_value, tb)</pre>
  76. <pre class="line after"><span class="ws"> </span>else:</pre>
  77. <pre class="line after"><span class="ws"> </span>raise e</pre>
  78. <pre class="line after"><span class="ws"></span> </pre>
  79. <pre class="line after"><span class="ws"> </span>self.log_exception((exc_type, exc_value, tb))</pre>
  80. <pre class="line after"><span class="ws"> </span>if handler is None:</pre></div>
  81. </div>
  82.  
  83. <li><div class="frame" id="frame-139843315999744">
  84. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/_compat.py"</cite>,
  85. line <em class="line">36</em>,
  86. in <code class="function">reraise</code></h4>
  87. <div class="source library"><pre class="line before"><span class="ws"> </span>import collections.abc as collections_abc</pre>
  88. <pre class="line before"><span class="ws"></span> </pre>
  89. <pre class="line before"><span class="ws"> </span>def reraise(tp, value, tb=None):</pre>
  90. <pre class="line before"><span class="ws"> </span>if value.__traceback__ is not tb:</pre>
  91. <pre class="line before"><span class="ws"> </span>raise value.with_traceback(tb)</pre>
  92. <pre class="line current"><span class="ws"> </span>raise value</pre>
  93. <pre class="line after"><span class="ws"></span> </pre>
  94. <pre class="line after"><span class="ws"> </span>implements_to_string = _identity</pre>
  95. <pre class="line after"><span class="ws"></span> </pre>
  96. <pre class="line after"><span class="ws"></span>else:</pre>
  97. <pre class="line after"><span class="ws"> </span>text_type = unicode</pre></div>
  98. </div>
  99.  
  100. <li><div class="frame" id="frame-139843315999072">
  101. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py"</cite>,
  102. line <em class="line">2311</em>,
  103. in <code class="function">wsgi_app</code></h4>
  104. <div class="source library"><pre class="line before"><span class="ws"> </span>ctx = self.request_context(environ)</pre>
  105. <pre class="line before"><span class="ws"> </span>error = None</pre>
  106. <pre class="line before"><span class="ws"> </span>try:</pre>
  107. <pre class="line before"><span class="ws"> </span>try:</pre>
  108. <pre class="line before"><span class="ws"> </span>ctx.push()</pre>
  109. <pre class="line current"><span class="ws"> </span>response = self.full_dispatch_request()</pre>
  110. <pre class="line after"><span class="ws"> </span>except Exception as e:</pre>
  111. <pre class="line after"><span class="ws"> </span>error = e</pre>
  112. <pre class="line after"><span class="ws"> </span>response = self.handle_exception(e)</pre>
  113. <pre class="line after"><span class="ws"> </span>except:</pre>
  114. <pre class="line after"><span class="ws"> </span>error = sys.exc_info()[1]</pre></div>
  115. </div>
  116.  
  117. <li><div class="frame" id="frame-139843315999968">
  118. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py"</cite>,
  119. line <em class="line">1834</em>,
  120. in <code class="function">full_dispatch_request</code></h4>
  121. <div class="source library"><pre class="line before"><span class="ws"> </span>request_started.send(self)</pre>
  122. <pre class="line before"><span class="ws"> </span>rv = self.preprocess_request()</pre>
  123. <pre class="line before"><span class="ws"> </span>if rv is None:</pre>
  124. <pre class="line before"><span class="ws"> </span>rv = self.dispatch_request()</pre>
  125. <pre class="line before"><span class="ws"> </span>except Exception as e:</pre>
  126. <pre class="line current"><span class="ws"> </span>rv = self.handle_user_exception(e)</pre>
  127. <pre class="line after"><span class="ws"> </span>return self.finalize_request(rv)</pre>
  128. <pre class="line after"><span class="ws"></span> </pre>
  129. <pre class="line after"><span class="ws"> </span>def finalize_request(self, rv, from_error_handler=False):</pre>
  130. <pre class="line after"><span class="ws"> </span>&quot;&quot;&quot;Given the return value from a view function this finalizes</pre>
  131. <pre class="line after"><span class="ws"> </span>the request by converting it into a response and invoking the</pre></div>
  132. </div>
  133.  
  134. <li><div class="frame" id="frame-139843316000080">
  135. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py"</cite>,
  136. line <em class="line">1737</em>,
  137. in <code class="function">handle_user_exception</code></h4>
  138. <div class="source library"><pre class="line before"><span class="ws"> </span>return self.handle_http_exception(e)</pre>
  139. <pre class="line before"><span class="ws"></span> </pre>
  140. <pre class="line before"><span class="ws"> </span>handler = self._find_error_handler(e)</pre>
  141. <pre class="line before"><span class="ws"></span> </pre>
  142. <pre class="line before"><span class="ws"> </span>if handler is None:</pre>
  143. <pre class="line current"><span class="ws"> </span>reraise(exc_type, exc_value, tb)</pre>
  144. <pre class="line after"><span class="ws"> </span>return handler(e)</pre>
  145. <pre class="line after"><span class="ws"></span> </pre>
  146. <pre class="line after"><span class="ws"> </span>def handle_exception(self, e):</pre>
  147. <pre class="line after"><span class="ws"> </span>&quot;&quot;&quot;Default exception handling that kicks in when an exception</pre>
  148. <pre class="line after"><span class="ws"> </span>occurs that is not caught. In debug mode the exception will</pre></div>
  149. </div>
  150.  
  151. <li><div class="frame" id="frame-139843316000192">
  152. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/_compat.py"</cite>,
  153. line <em class="line">36</em>,
  154. in <code class="function">reraise</code></h4>
  155. <div class="source library"><pre class="line before"><span class="ws"> </span>import collections.abc as collections_abc</pre>
  156. <pre class="line before"><span class="ws"></span> </pre>
  157. <pre class="line before"><span class="ws"> </span>def reraise(tp, value, tb=None):</pre>
  158. <pre class="line before"><span class="ws"> </span>if value.__traceback__ is not tb:</pre>
  159. <pre class="line before"><span class="ws"> </span>raise value.with_traceback(tb)</pre>
  160. <pre class="line current"><span class="ws"> </span>raise value</pre>
  161. <pre class="line after"><span class="ws"></span> </pre>
  162. <pre class="line after"><span class="ws"> </span>implements_to_string = _identity</pre>
  163. <pre class="line after"><span class="ws"></span> </pre>
  164. <pre class="line after"><span class="ws"></span>else:</pre>
  165. <pre class="line after"><span class="ws"> </span>text_type = unicode</pre></div>
  166. </div>
  167.  
  168. <li><div class="frame" id="frame-139843315999296">
  169. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py"</cite>,
  170. line <em class="line">1832</em>,
  171. in <code class="function">full_dispatch_request</code></h4>
  172. <div class="source library"><pre class="line before"><span class="ws"> </span>self.try_trigger_before_first_request_functions()</pre>
  173. <pre class="line before"><span class="ws"> </span>try:</pre>
  174. <pre class="line before"><span class="ws"> </span>request_started.send(self)</pre>
  175. <pre class="line before"><span class="ws"> </span>rv = self.preprocess_request()</pre>
  176. <pre class="line before"><span class="ws"> </span>if rv is None:</pre>
  177. <pre class="line current"><span class="ws"> </span>rv = self.dispatch_request()</pre>
  178. <pre class="line after"><span class="ws"> </span>except Exception as e:</pre>
  179. <pre class="line after"><span class="ws"> </span>rv = self.handle_user_exception(e)</pre>
  180. <pre class="line after"><span class="ws"> </span>return self.finalize_request(rv)</pre>
  181. <pre class="line after"><span class="ws"></span> </pre>
  182. <pre class="line after"><span class="ws"> </span>def finalize_request(self, rv, from_error_handler=False):</pre></div>
  183. </div>
  184.  
  185. <li><div class="frame" id="frame-139843315999632">
  186. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py"</cite>,
  187. line <em class="line">1818</em>,
  188. in <code class="function">dispatch_request</code></h4>
  189. <div class="source library"><pre class="line before"><span class="ws"> </span># request came with the OPTIONS method, reply automatically</pre>
  190. <pre class="line before"><span class="ws"> </span>if getattr(rule, 'provide_automatic_options', False) \</pre>
  191. <pre class="line before"><span class="ws"> </span>and req.method == 'OPTIONS':</pre>
  192. <pre class="line before"><span class="ws"> </span>return self.make_default_options_response()</pre>
  193. <pre class="line before"><span class="ws"> </span># otherwise dispatch to the handler for that endpoint</pre>
  194. <pre class="line current"><span class="ws"> </span>return self.view_functions[rule.endpoint](**req.view_args)</pre>
  195. <pre class="line after"><span class="ws"></span> </pre>
  196. <pre class="line after"><span class="ws"> </span>def full_dispatch_request(self):</pre>
  197. <pre class="line after"><span class="ws"> </span>&quot;&quot;&quot;Dispatches the request and on top of that performs request</pre>
  198. <pre class="line after"><span class="ws"> </span>pre and postprocessing as well as HTTP exception catching and</pre>
  199. <pre class="line after"><span class="ws"> </span>error handling.</pre></div>
  200. </div>
  201.  
  202. <li><div class="frame" id="frame-139843316000416">
  203. <h4>File <cite class="filename">"/src/scoring_model/api.py"</cite>,
  204. line <em class="line">72</em>,
  205. in <code class="function">predict</code></h4>
  206. <div class="source "><pre class="line before"><span class="ws"> </span>with open(filename, 'w') as fp:</pre>
  207. <pre class="line before"><span class="ws"> </span>json.dump([data], fp)</pre>
  208. <pre class="line before"><span class="ws"> </span>time2 = time.time()</pre>
  209. <pre class="line before"><span class="ws"></span> </pre>
  210. <pre class="line before"><span class="ws"> </span># vytáhnu si jen finální X, ostatní věci rovnou zahazuji</pre>
  211. <pre class="line current"><span class="ws"> </span>_, _, _, _, _, X = clean_new_x(filename)</pre>
  212. <pre class="line after"><span class="ws"> </span>time3 = time.time()</pre>
  213. <pre class="line after"><span class="ws"> </span>Y = MODEL.predict_proba(X)[0][1]</pre>
  214. <pre class="line after"><span class="ws"> </span>time4 = time.time()</pre>
  215. <pre class="line after"><span class="ws"></span> </pre>
  216. <pre class="line after"><span class="ws"> </span>response = {</pre></div>
  217. </div>
  218.  
  219. <li><div class="frame" id="frame-139843316000808">
  220. <h4>File <cite class="filename">"/src/scoring_model/DataProcessing.py"</cite>,
  221. line <em class="line">175</em>,
  222. in <code class="function">clean_new_x</code></h4>
  223. <div class="source "><pre class="line before"><span class="ws"> </span>Export3['Request_DayOfWeek'] = Export3['request_time'].apply(lambda x: x.strftime(&quot;%A&quot;))</pre>
  224. <pre class="line before"><span class="ws"> </span>Export3['Request_zoneDay'] = Export3['request_time'].apply(lambda x: x.strftime(&quot;%p&quot;))</pre>
  225. <pre class="line before"><span class="ws"> </span>Export3['Request_Month'] = Export3['request_time'].apply(lambda x: x.strftime(&quot;%b&quot;))</pre>
  226. <pre class="line before"><span class="ws"> </span>Export3['Request_Time'] = Export3['request_time'].apply(lambda x: x.strftime(&quot;%X&quot;))</pre>
  227. <pre class="line before"><span class="ws"></span> </pre>
  228. <pre class="line current"><span class="ws"> </span>Export3.loc[(Export3.Request_Time &gt; '00:00:00') &amp; (Export3.Request_Time &lt;= '03:00:00'), 'Range_time'] = '0_3'</pre>
  229. <pre class="line after"><span class="ws"> </span>Export3.loc[(Export3.Request_Time &gt; '03:00:00') &amp; (Export3.Request_Time &lt;= '06:00:00'), 'Range_time'] = '3_6'</pre>
  230. <pre class="line after"><span class="ws"> </span>Export3.loc[(Export3.Request_Time &gt; '06:00:00') &amp; (Export3.Request_Time &lt;= '09:00:00'), 'Range_time'] = '6_9'</pre>
  231. <pre class="line after"><span class="ws"> </span>Export3.loc[(Export3.Request_Time &gt; '09:00:00') &amp; (Export3.Request_Time &lt;= '12:00:00'), 'Range_time'] = '9_12'</pre>
  232. <pre class="line after"><span class="ws"> </span>Export3.loc[(Export3.Request_Time &gt; '12:00:00') &amp; (Export3.Request_Time &lt;= '15:00:00'), 'Range_time'] = '12_15'</pre>
  233. <pre class="line after"><span class="ws"> </span>Export3.loc[(Export3.Request_Time &gt; '15:00:00') &amp; (Export3.Request_Time &lt;= '18:00:00'), 'Range_time'] = '15_18'</pre></div>
  234. </div>
  235.  
  236. <li><div class="frame" id="frame-139843315999856">
  237. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/pandas/core/indexing.py"</cite>,
  238. line <em class="line">190</em>,
  239. in <code class="function">__setitem__</code></h4>
  240. <div class="source library"><pre class="line before"><span class="ws"> </span>key = tuple(com.apply_if_callable(x, self.obj)</pre>
  241. <pre class="line before"><span class="ws"> </span>for x in key)</pre>
  242. <pre class="line before"><span class="ws"> </span>else:</pre>
  243. <pre class="line before"><span class="ws"> </span>key = com.apply_if_callable(key, self.obj)</pre>
  244. <pre class="line before"><span class="ws"> </span>indexer = self._get_setitem_indexer(key)</pre>
  245. <pre class="line current"><span class="ws"> </span>self._setitem_with_indexer(indexer, value)</pre>
  246. <pre class="line after"><span class="ws"></span> </pre>
  247. <pre class="line after"><span class="ws"> </span>def _validate_key(self, key, axis):</pre>
  248. <pre class="line after"><span class="ws"> </span>&quot;&quot;&quot;</pre>
  249. <pre class="line after"><span class="ws"> </span>Ensure that key is valid for current indexer.</pre>
  250. <pre class="line after"><span class="ws"></span> </pre></div>
  251. </div>
  252.  
  253. <li><div class="frame" id="frame-139843316000696">
  254. <h4>File <cite class="filename">"/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/pandas/core/indexing.py"</cite>,
  255. line <em class="line">356</em>,
  256. in <code class="function">_setitem_with_indexer</code></h4>
  257. <div class="source library"><pre class="line before"><span class="ws"> </span>len(_ax) for _i, _ax in enumerate(self.obj.axes)</pre>
  258. <pre class="line before"><span class="ws"> </span>if _i != i</pre>
  259. <pre class="line before"><span class="ws"> </span>]</pre>
  260. <pre class="line before"><span class="ws"> </span>if any(not l for l in len_non_info_axes):</pre>
  261. <pre class="line before"><span class="ws"> </span>if not is_list_like_indexer(value):</pre>
  262. <pre class="line current"><span class="ws"> </span>raise ValueError(&quot;cannot set a frame with no &quot;</pre>
  263. <pre class="line after"><span class="ws"> </span>&quot;defined index and a scalar&quot;)</pre>
  264. <pre class="line after"><span class="ws"> </span>self.obj[key] = value</pre>
  265. <pre class="line after"><span class="ws"> </span>return self.obj</pre>
  266. <pre class="line after"><span class="ws"></span> </pre>
  267. <pre class="line after"><span class="ws"> </span># add a new item with the dtype setup</pre></div>
  268. </div>
  269. </ul>
  270. <blockquote>ValueError: cannot set a frame with no defined index and a scalar</blockquote>
  271. </div>
  272.  
  273. <div class="plain">
  274. <form action="/?__debugger__=yes&amp;cmd=paste" method="post">
  275. <p>
  276. <input type="hidden" name="language" value="pytb">
  277. This is the Copy/Paste friendly version of the traceback. <span
  278. class="pastemessage">You can also paste this traceback into
  279. a <a href="https://gist.github.com/">gist</a>:
  280. <input type="submit" value="create paste"></span>
  281. </p>
  282. <textarea cols="50" rows="10" name="code" readonly>Traceback (most recent call last):
  283. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py&quot;, line 2328, in __call__
  284. return self.wsgi_app(environ, start_response)
  285. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py&quot;, line 2314, in wsgi_app
  286. response = self.handle_exception(e)
  287. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py&quot;, line 1760, in handle_exception
  288. reraise(exc_type, exc_value, tb)
  289. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/_compat.py&quot;, line 36, in reraise
  290. raise value
  291. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py&quot;, line 2311, in wsgi_app
  292. response = self.full_dispatch_request()
  293. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py&quot;, line 1834, in full_dispatch_request
  294. rv = self.handle_user_exception(e)
  295. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py&quot;, line 1737, in handle_user_exception
  296. reraise(exc_type, exc_value, tb)
  297. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/_compat.py&quot;, line 36, in reraise
  298. raise value
  299. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py&quot;, line 1832, in full_dispatch_request
  300. rv = self.dispatch_request()
  301. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py&quot;, line 1818, in dispatch_request
  302. return self.view_functions[rule.endpoint](**req.view_args)
  303. File &quot;/src/scoring_model/api.py&quot;, line 72, in predict
  304. _, _, _, _, _, X = clean_new_x(filename)
  305. File &quot;/src/scoring_model/DataProcessing.py&quot;, line 175, in clean_new_x
  306. Export3.loc[(Export3.Request_Time &gt; '00:00:00') &amp; (Export3.Request_Time &lt;= '03:00:00'), 'Range_time'] = '0_3'
  307. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/pandas/core/indexing.py&quot;, line 190, in __setitem__
  308. self._setitem_with_indexer(indexer, value)
  309. File &quot;/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/pandas/core/indexing.py&quot;, line 356, in _setitem_with_indexer
  310. raise ValueError(&quot;cannot set a frame with no &quot;
  311. ValueError: cannot set a frame with no defined index and a scalar</textarea>
  312. </form>
  313. </div>
  314. <div class="explanation">
  315. The debugger caught an exception in your WSGI application. You can now
  316. look at the traceback which led to the error. <span class="nojavascript">
  317. If you enable JavaScript you can also use additional features such as code
  318. execution (if the evalex feature is enabled), automatic pasting of the
  319. exceptions and much more.</span>
  320. </div>
  321. <div class="footer">
  322. Brought to you by <strong class="arthur">DON'T PANIC</strong>, your
  323. friendly Werkzeug powered traceback interpreter.
  324. </div>
  325. </div>
  326.  
  327. <div class="pin-prompt">
  328. <div class="inner">
  329. <h3>Console Locked</h3>
  330. <p>
  331. The console is locked and needs to be unlocked by entering the PIN.
  332. You can find the PIN printed out on the standard output of your
  333. shell that runs the server.
  334. <form>
  335. <p>PIN:
  336. <input type=text name=pin size=14>
  337. <input type=submit name=btn value="Confirm Pin">
  338. </form>
  339. </div>
  340. </div>
  341. </body>
  342. </html>
  343.  
  344. <!--
  345.  
  346. Traceback (most recent call last):
  347. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py", line 2328, in __call__
  348. return self.wsgi_app(environ, start_response)
  349. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py", line 2314, in wsgi_app
  350. response = self.handle_exception(e)
  351. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py", line 1760, in handle_exception
  352. reraise(exc_type, exc_value, tb)
  353. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
  354. raise value
  355. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app
  356. response = self.full_dispatch_request()
  357. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
  358. rv = self.handle_user_exception(e)
  359. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception
  360. reraise(exc_type, exc_value, tb)
  361. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
  362. raise value
  363. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
  364. rv = self.dispatch_request()
  365. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request
  366. return self.view_functions[rule.endpoint](**req.view_args)
  367. File "/src/scoring_model/api.py", line 72, in predict
  368. _, _, _, _, _, X = clean_new_x(filename)
  369. File "/src/scoring_model/DataProcessing.py", line 175, in clean_new_x
  370. Export3.loc[(Export3.Request_Time > '00:00:00') & (Export3.Request_Time <= '03:00:00'), 'Range_time'] = '0_3'
  371. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/pandas/core/indexing.py", line 190, in __setitem__
  372. self._setitem_with_indexer(indexer, value)
  373. File "/root/.local/share/virtualenvs/scoring_model-W1bJqQjW/lib/python3.7/site-packages/pandas/core/indexing.py", line 356, in _setitem_with_indexer
  374. raise ValueError("cannot set a frame with no "
  375. ValueError: cannot set a frame with no defined index and a scalar
  376.  
  377. -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement