Following code works fine on Windows 10 (Python 3.7.4) but does "Segmentation fault (core dumped)" when run on Ubuntu 19.2 at point of plotting (Python 3.6.8):
from flask import Flask, request, render_template, redirect, send_file
import pandas as pd
import os, psutil, math, subprocess
....
@app.route('/plott/d/<n>/<dp>')
def plottd(n,dp):
dft = dft[dft.dp.eq(dp)]
if dft.shape[0] >= 2:
dft['value'] = dft['value'].astype(float)
plot_fig = dft.plot(x='timestamp',y='value', kind = 'line', title="test")
plot_fig.grid('on')
fn = 'static/'+str(dp)+'.png'
plot_fig.get_figure().savefig(fn)
return send_file(fn, mimetype='image/png')
return "not enough values for plott/d " + str(dp)
....