<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi all,<br><br>I have a pvbatch script that worked in version 3.12. It uses plot over line and writes out CSV data.&nbsp; Now I get the following error in version 3.14:<br><br>Is this a bug or am I supposed to call the writer differently in 3.14?<br><br>Thanks!<br><br>Tony<br><br><br><br>ERROR: In /build/buildd/paraview-3.14.1/ParaViewCore/ServerManager/vtkSMWriterFactory.cxx, line 374<br>vtkSMWriterFactory (0x17ee360): No matching writer found for extension: csv<br><br>Traceback (most recent call last):<br>&nbsp; File "wakeProfilesAllTurbines.py", line 65, in &lt;module&gt;<br>&nbsp;&nbsp;&nbsp; writer.FieldAssociation = "Points"<br>AttributeError: 'NoneType' object has no attribute 'FieldAssociation'<br><br><br><br><br>Here is the script Im using:<br><br><br><br>try: paraview.simple<br>except: from paraview.simple import *<br>paraview.simple._DisableFirstRenderCameraReset()<br>import os<br>import math<br>import matplotlib as mpl<br>mpl.use('Agg')<br>import matplotlib.pyplot as plt<br>import csv<br>from scipy.integrate import trapz<br># Current location<br>directory=os.getcwd()<br>if not os.path.exists('./wakeProfiles/plots/'):<br>&nbsp;&nbsp;&nbsp; os.makedirs('./wakeProfiles/plots/')<br># Rotor Diameter<br>D=93<br>width=D*1.5<br>profiles=[0.125,0.25,0.5,0.75,1,2,3,4]<br>layout=open('./layout.dat')<br>Umean_slice_0_vtk = LegacyVTKReader( FileNames=[directory+'/../ADM/sliceDataADM/12746.8908019/Umean_slice_0.vtk'] )<br>Umean_slice_1_vtk = LegacyVTKReader( FileNames=[directory+'/../ALM/sliceDataALM/12771/Umean_slice_0.vtk'] )<br>SetActiveSource(Umean_slice_0_vtk)<br>CellDatatoPointData1 = CellDatatoPointData()<br>SetActiveSource(CellDatatoPointData1)<br>Calculator1 = Calculator()<br>Calculator1.AttributeMode = 'point_data'<br>Calculator1.Function = 'Umean_X*cos(0.84444265) + Umean_Y*sin(0.84444265)'<br>Calculator1.ResultArrayName = 'U_row'<br>SetActiveSource(Umean_slice_1_vtk)<br>CellDatatoPointData2 = CellDatatoPointData()<br>SetActiveSource(CellDatatoPointData2)<br>Calculator2 = Calculator()<br>Calculator2.AttributeMode = 'point_data'<br>Calculator2.Function = 'Umean_X*cos(0.84444265) + Umean_Y*sin(0.84444265)'<br>Calculator2.ResultArrayName = 'U_row'<br>for i, turbine in enumerate(layout):<br>&nbsp;&nbsp;&nbsp; for profile in profiles:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SetActiveSource(Calculator1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PlotOverLine1 = PlotOverLine( Source="High Resolution Line Source" )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PlotOverLine1.Source.Resolution = 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alpha0=0.84444265-math.atan((width/2)/(profile*D))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alpha1=0.84444265+math.atan((width/2)/(profile*D))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; L=math.sqrt((D*profile)**2+(width/2)**2)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x0=float(turbine.split()[0])+L*math.cos(alpha0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y0=float(turbine.split()[1])+L*math.sin(alpha0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x1=float(turbine.split()[0])+L*math.cos(alpha1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y1=float(turbine.split()[1])+L*math.sin(alpha1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PlotOverLine1.Source.Point1 = [x0, y0, 65.0]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PlotOverLine1.Source.Point2 = [x1, y1, 65.0]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if not os.path.exists('./wakeProfiles/'+str(profile)):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; os.makedirs('./wakeProfiles/'+str(profile))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if not os.path.exists('./wakeProfiles/plots/'+str(profile)):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; os.makedirs('./wakeProfiles/plots/'+str(profile))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nameADM=directory+'/wakeProfiles/'+str(profile)+'/ADM'+'turbine'+str(i+1)+'.csv'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; writer = CreateWriter(nameADM, PlotOverLine1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; writer.FieldAssociation = "Points"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; writer.UpdatePipeline()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; del writer<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SetActiveSource(Calculator2)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PlotOverLine2 = PlotOverLine( Source="High Resolution Line Source" )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PlotOverLine2.Source.Resolution = 100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PlotOverLine2.Source.Point1 = [x0, y0, 65.0]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PlotOverLine2.Source.Point2 = [x1, y1, 65.0]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nameALM=directory+'/wakeProfiles/'+str(profile)+'/ALM'+'turbine'+str(i+1)+'.csv'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; writer = CreateWriter(nameALM, PlotOverLine2)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; writer.FieldAssociation = "Points"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; writer.UpdatePipeline()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; del writer<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; csvreader1 = csv.reader(open(nameADM,'rb'))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; csvreader2 = csv.reader(open(nameALM,'rb'))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x,y,x1,y1=[],[],[],[]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for j, line in enumerate(csvreader1):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if j&gt;0:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x.append((float(line[5])-width/2)/D)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y.append(float(line[0]))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for j, line in enumerate(csvreader2):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if j&gt;0:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x1.append((float(line[5])-width/2)/D)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y1.append(float(line[0]))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plt.plot(x,y,'-',label='ADM',color='black')<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plt.plot(x1,y1,'--',label='ALM',color='black')<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plt.xlabel('Distance')<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plt.ylabel(r'$U$ (m/s)')<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plt.legend(loc='best')<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plt.ylim([2,10])<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plt.savefig('./wakeProfiles/plots/'+str(profile)+'/turbine'+str(i+1)+'.eps')<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plt.savefig('./wakeProfiles/plots/'+str(profile)+'/turbine'+str(i+1)+'.png')<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plt.clf()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; del x,y,x1,y1,csvreader1,csvreader2<br><br><br><br>                                               </div></body>
</html>