Project

General

Profile

Actions

Product Backlog #2772

closed

CBM: 2019 report upload

Added by ticket bot over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Immediate
Start date:
Due date:
% Done:

0%

Estimated time:
PBI:
Yes
Sprint:

Description

MG2: Przy umieszczaniu raportu 1957-2019 Finnmaid wyskakuje błąd:
Message: <!doctype html> <html lang=en> <head> <title>ValueError: cannot convert float NaN to integer // Werkzeug Debugger</title> <link rel="stylesheet" href="?__debugger__=yes&cmd=resource&f=style.css"> <link rel="shortcut icon" href="?__debugger__=yes&cmd=resource&f=console.png"> <script src="?__debugger__=yes&cmd=resource&f=debugger.js"></script> <script> var CONSOLE_MODE = false, EVALEX = true, EVALEX_TRUSTED = false, SECRET = "moWtArVJRcoTo15DIIIh"; </script> </head> <body style="background-color: #fff"> <div class="debugger"> <h1>ValueError</h1> <div class="detail"> <p class="errormsg">ValueError: cannot convert float NaN to integer </p> </div> <h2 class="traceback">Traceback <em>(most recent call last)</em></h2> <div class="traceback"> <h3></h3> <ul><li><div class="frame" id="frame-139976274893776"> <h4>File <cite class="filename">"/usr/local/lib/python3.7/site-packages/flask/app.py"</cite>, line <em class="line">2095</em>, in __call__</h4> <div class="source library">

<span class="ws"> </span>def __call__(self, environ: dict, start_response: t.Callable) -&gt; t.Any:
<span class="ws"> </span>&#34;&#34;&#34;The WSGI server calls the Flask application object as the
<span class="ws"> </span>WSGI application. This calls :meth:`wsgi_app`, which can be
<span class="ws"> </span>wrapped to apply middleware.
<span class="ws"> </span>&#34;&#34;&#34;
<span class="ws"> </span>return self.wsgi_app(environ, start_response)
</div> </div> <li><div class="frame" id="frame-139976274893008"> <h4>File <cite class="filename">"/usr/local/lib/python3.7/site-packages/flask/app.py"</cite>, line <em class="line">2080</em>, in wsgi_app</h4> <div class="source library">
<span class="ws"> </span>try:
<span class="ws"> </span>ctx.push()
<span class="ws"> </span>response = self.full_dispatch_request()
<span class="ws"> </span>except Exception as e:
<span class="ws"> </span>error = e
<span class="ws"> </span>response = self.handle_exception(e)
<span class="ws"> </span>except: # noqa: B001
<span class="ws"> </span>error = sys.exc_info()[1]
<span class="ws"> </span>raise
<span class="ws"> </span>return response(environ, start_response)
<span class="ws"> </span>finally:
</div> </div> <li><div class="frame" id="frame-139976274891600"> <h4>File <cite class="filename">"/usr/local/lib/python3.7/site-packages/flask/app.py"</cite>, line <em class="line">2077</em>, in wsgi_app</h4> <div class="source library">
<span class="ws"> </span>ctx = self.request_context(environ)
<span class="ws"> </span>error: t.Optional[BaseException] = None
<span class="ws"> </span>try:
<span class="ws"> </span>try:
<span class="ws"> </span>ctx.push()
<span class="ws"> </span>response = self.full_dispatch_request()
<span class="ws"> </span>except Exception as e:
<span class="ws"> </span>error = e
<span class="ws"> </span>response = self.handle_exception(e)
<span class="ws"> </span>except: # noqa: B001
<span class="ws"> </span>error = sys.exc_info()[1]
</div> </div> <li><div class="frame" id="frame-139976274894288"> <h4>File <cite class="filename">"/usr/local/lib/python3.7/site-packages/flask/app.py"</cite>, line <em class="line">1525</em>, in full_dispatch_request</h4> <div class="source library">
<span class="ws"> </span>request_started.send(self)
<span class="ws"> </span>rv = self.preprocess_request()
<span class="ws"> </span>if rv is None:
<span class="ws"> </span>rv = self.dispatch_request()
<span class="ws"> </span>except Exception as e:
<span class="ws"> </span>rv = self.handle_user_exception(e)
<span class="ws"> </span>return self.finalize_request(rv)
<span class="ws"></span> 
<span class="ws"> </span>def finalize_request(
<span class="ws"> </span>self,
<span class="ws"> </span>rv: t.Union[ResponseReturnValue, HTTPException],
</div> </div> <li><div class="frame" id="frame-139976274891344"> <h4>File <cite class="filename">"/usr/local/lib/python3.7/site-packages/flask/app.py"</cite>, line <em class="line">1523</em>, in full_dispatch_request</h4> <div class="source library">
<span class="ws"> </span>self.try_trigger_before_first_request_functions()
<span class="ws"> </span>try:
<span class="ws"> </span>request_started.send(self)
<span class="ws"> </span>rv = self.preprocess_request()
<span class="ws"> </span>if rv is None:
<span class="ws"> </span>rv = self.dispatch_request()
<span class="ws"> </span>except Exception as e:
<span class="ws"> </span>rv = self.handle_user_exception(e)
<span class="ws"> </span>return self.finalize_request(rv)
<span class="ws"></span> 
<span class="ws"> </span>def finalize_request(
</div> </div> <li><div class="frame" id="frame-139976274890960"> <h4>File <cite class="filename">"/usr/local/lib/python3.7/site-packages/flask/app.py"</cite>, line <em class="line">1509</em>, in dispatch_request</h4> <div class="source library">
<span class="ws"> </span>getattr(rule, &#34;provide_automatic_options&#34;, False)
<span class="ws"> </span>and req.method == &#34;OPTIONS&#34;
<span class="ws"> </span>):
<span class="ws"> </span>return self.make_default_options_response()
<span class="ws"> </span># otherwise dispatch to the handler for that endpoint
<span class="ws"> </span>return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
<span class="ws"></span> 
<span class="ws"> </span>def full_dispatch_request(self) -&gt; Response:
<span class="ws"> </span>&#34;&#34;&#34;Dispatches the request and on top of that performs request
<span class="ws"> </span>pre and postprocessing as well as HTTP exception catching and
<span class="ws"> </span>error handling.
</div> </div> <li><div class="frame" id="frame-139976274891216"> <h4>File <cite class="filename">"/data_fill_api/app.py"</cite>, line <em class="line">169</em>, in get_report_details</h4> <div class="source ">
<span class="ws"></span>@app.route(&#39;/put_report_json&#39;, methods=[&#39;GET&#39;, &#39;POST&#39;])
<span class="ws"></span>def get_report_details():
<span class="ws"> </span>content = request.json
<span class="ws"> </span># if content[&#39;api_key&#39;] in ALLOWED_LOGINS:
<span class="ws"> </span># if len(content[&#39;remarks_reminder_json&#39;]) &gt; 2:
<span class="ws"> </span>put_new_report(content)
<span class="ws"> </span># else:
<span class="ws"> </span># return &#39;Missing remarks&#39;
<span class="ws"></span> 
<span class="ws"></span> 
<span class="ws"> </span>return &#39;True&#39;
</div> </div> <li><div class="frame" id="frame-139976274893648"> <h4>File <cite class="filename">"/data_fill_api/app.py"</cite>, line <em class="line">255</em>, in put_new_report</h4> <div class="source ">
<span class="ws"></span> 
<span class="ws"> </span>#db.session.commit()
<span class="ws"></span> 
<span class="ws"> </span>Harmonogram_det_row = HarmonogramDetails(
<span class="ws"> </span>int(harmo_series.harmonogram_id_pkey),
<span class="ws"> </span>int(harmo_series.service_type_fkey),
<span class="ws"> </span>harmo_series.place,
<span class="ws"> </span>bool(harmo_series.priority),
<span class="ws"> </span>harmo_series.trendchart_visible_flag
<span class="ws"></span> 
<span class="ws"> </span>)
</div> </div> </ul> <blockquote>ValueError: cannot convert float NaN to integer </blockquote> </div> <div class="plain"> <p> This is the Copy/Paste friendly version of the traceback. </p> <textarea cols="50" rows="10" name="code" readonly>Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2095, in call return self.wsgi_app(environ, start_response) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2080, in wsgi_app response = self.handle_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1525, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(*req.view_args) File "/data_fill_api/app.py", line 169, in get_report_details put_new_report(content) File "/data_fill_api/app.py", line 255, in put_new_report int(harmo_series.service_type_fkey), ValueError: cannot convert float NaN to integer </textarea> </div> <div class="explanation"> The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. <span class="nojavascript"> If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.</span> </div> <div class="footer"> Brought to you by <strong class="arthur">DON'T PANIC</strong>, your friendly Werkzeug powered traceback interpreter. </div> </div> <div class="pin-prompt"> <div class="inner"> <h3>Console Locked</h3> <p> The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server. <form> <p>PIN: <input type=text name=pin size=14> <input type=submit name=btn value="Confirm Pin"> </form> </div> </div> </body> </html> <!-- Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2095, in call return self.wsgi_app(environ, start_response) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2080, in wsgi_app response = self.handle_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1525, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(*req.view_args) File "/data_fill_api/app.py", line 169, in get_report_details put_new_report(content) File "/data_fill_api/app.py", line 255, in put_new_report int(harmo_series.service_type_fkey), ValueError: cannot convert float NaN to integer -->


Files

MG2 1957-2022_Finnmaid_ticket.png (480 KB) MG2 1957-2022_Finnmaid_ticket.png ticket bot, 09/09/2022 09:23 AM
Actions

Also available in: Atom PDF