[NbConvertApp] Converting notebook /home/aavsonet/scripts/reports/pipeline_report.ipynb to HTML [NbConvertApp] Executing notebook with kernel: python3 [NbConvertApp] ERROR | Error while converting '/home/aavsonet/scripts/reports/pipeline_report.ipynb' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/nbconvert/nbconvertapp.py", line 410, in export_single_notebook output, resources = self.exporter.from_filename(notebook_filename, resources=resources) File "/usr/lib/python3/dist-packages/nbconvert/exporters/exporter.py", line 179, in from_filename return self.from_file(f, resources=resources, **kw) File "/usr/lib/python3/dist-packages/nbconvert/exporters/exporter.py", line 197, in from_file return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw) File "/usr/lib/python3/dist-packages/nbconvert/exporters/html.py", line 95, in from_notebook_node return super(HTMLExporter, self).from_notebook_node(nb, resources, **kw) File "/usr/lib/python3/dist-packages/nbconvert/exporters/templateexporter.py", line 307, in from_notebook_node nb_copy, resources = super(TemplateExporter, self).from_notebook_node(nb, resources, **kw) File "/usr/lib/python3/dist-packages/nbconvert/exporters/exporter.py", line 139, in from_notebook_node nb_copy, resources = self._preprocess(nb_copy, resources) File "/usr/lib/python3/dist-packages/nbconvert/exporters/exporter.py", line 316, in _preprocess nbc, resc = preprocessor(nbc, resc) File "/usr/lib/python3/dist-packages/nbconvert/preprocessors/base.py", line 47, in __call__ return self.preprocess(nb, resources) File "/usr/lib/python3/dist-packages/nbconvert/preprocessors/execute.py", line 405, in preprocess nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources) File "/usr/lib/python3/dist-packages/nbconvert/preprocessors/base.py", line 69, in preprocess nb.cells[index], resources = self.preprocess_cell(cell, resources, index) File "/usr/lib/python3/dist-packages/nbconvert/preprocessors/execute.py", line 448, in preprocess_cell raise CellExecutionError.from_cell_and_msg(cell, out) nbconvert.preprocessors.execute.CellExecutionError: An error occurred while executing the following cell: ------------------ logday= '20'+yymmdd logdir= "/mnt/data3/data/arne/"+telescope+"_logs/Scheduler/AAVSO/" if os.path.exists(logdir+ logday): logs= os.listdir(logdir+ logday) logs.sort(key= lambda x: x[-19:-4]) # in order of the timestamp in the file name # not really necessary to sort since we are graphing def to_hrs(s): # hh:mm:ss to hrs hr, min, sec = [float(x) for x in s.split(':')] t= (hr*3600 + min*60 + sec)/3600 return t # gather data from logs for graphing time= [[],[],[],[],[]] # 0 solve, 1 all sky, 2 sync point, 3 failures, 4 first solve val=[[],[],[],[],[]] lastval= 0 linecnt= 0 for logfile in logs: with open(os.path.join(logdir+ logday, logfile), errors= "ignore") as input_file: first= True for line in input_file: #if m:= re.search("Pointing error is", line): # indented is All-sky m= re.search("Pointing error is", line) # indented is All-sky if m : tok= line.split() lastval =float(tok[4]) col= 1 if line[11]==' ' else 0 # all sky or regular time[col].append(to_hrs(tok[0])) val[col].append(lastval) if first: col= 4 first= False # first of the target time[col].append(to_hrs(tok[0])) val[col].append(lastval) # model update catch #if m:= re.search("ointing model updated", line): m= re.search("ointing model updated", line) if m : tok= line.split() time[2].append(to_hrs(tok[0])) val[2].append(lastval) # script errors #if m:= re.search("Too many failures", line): m= re.search("Too many failures", line) if m : tok= line.split() time[3].append(to_hrs(tok[0])) val[3].append(lastval) #print(to_hrs(tok[0])) # find the first timestamp captured in any of the series firsttime= 999 for i in range(len(time)): try: firsttime= min(time[i][0], firsttime) except: pass for i in range(len(time)): # add 24 if crossing midnight time[i]= [ x+ (24 if x < firsttime else 0) for x in time[i]] # 1am is 1 or 25 # switch to local time time[i]= [x+ telescop['utc_offset']+(24 if (firsttime+telescop['utc_offset'])<0 else 0) for x in time[i]] plt.style.use('classic') fig = plt.figure(figsize = (12,8)) ax = fig.add_subplot(111) # min/max safe from empty arrays def smin(z, default= 999): if len(z): return min(z) else: return default def smax(z): if len(z): return max(z) else: return 0 ax.set_xlim([-0.1+min(map(smin ,time)) , 0.1+max(map(smax,time))]) ax.set_ylim([0, 1+max(map(smax,val))]) ax.plot(time[4], val[4], marker='s', fillstyle='none', color='white', markersize=5, markeredgecolor='red',label="first solve"); ax.plot(time[0], val[0], marker='.', color='white', markersize=10, markeredgecolor='blue',label="regular solve"); ax.plot(time[1], val[1], marker='$A$', color='white', markersize=10, markeredgecolor='red',label="All Sky solve"); ax.plot(time[2], val[2], marker='o', fillstyle='none', color='white', markersize=20, markeredgecolor='red',label="Sync"); ax.plot(time[3], val[3], marker='$L$', fillstyle='none', color='white', markersize=15, markeredgecolor='red',label="lost scope"); #ax.plot(time, kind, '.', color='red',markeredgecolor='red',label="kind"); ax.legend(loc='upper center', ncol=2, frameon=False) # ax.set_ylim(mintemp,maxtemp) ax.set(title="Pointing Performance",ylabel="position error in arcmin",xlabel="hrs since last midnight (local)"); # ccd_temp_filename = 'pipeline_report_images/' + 'ccd_temp.png' #fig.savefig(ccd_temp_filename) ------------------ --------------------------------------------------------------------------- ValueError Traceback (most recent call last)  in   45 if m :  46 tok= line.split() ---> 47 time[3].append(to_hrs(tok[0]))  48 val[3].append(lastval)  49 #print(to_hrs(tok[0]))  in to_hrs(s)  7   8 def to_hrs(s): # hh:mm:ss to hrs ----> 9 hr, min, sec = [float(x) for x in s.split(':')]  10 t= (hr*3600 + min*60 + sec)/3600  11 return t  in (.0)  7   8 def to_hrs(s): # hh:mm:ss to hrs ----> 9 hr, min, sec = [float(x) for x in s.split(':')]  10 t= (hr*3600 + min*60 + sec)/3600  11 return t ValueError: could not convert string to float: '**Too' ValueError: could not convert string to float: '**Too'