New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3d broken? #318

Closed
doutriaux1 opened this Issue Feb 21, 2018 · 1 comment

Comments

Projects
None yet
4 participants
@doutriaux1
Member

doutriaux1 commented Feb 21, 2018

import vcs
import cdms2
f = cdms2.open(vcs.sample_data+"/clt.nc")
s=f("clt")
sc = vcs.create3d_scalar()
x=vcs.init()
x.plot(s,sc)

gives:

Warning, can't open data file 'None'
Error pickling object {'latLonGrid': True, 'title': 'clt:Total cloudiness', 'datatype': 'Float', 'timeUnits': 'months since 1979-1-1 0', 'timeValue': 0.0, 'lon': array([-180., -175., -170., -165., -160., -155., -150., -145., -140.,
       -135., -130., -125., -120., -115., -110., -105., -100.,  -95.,
        -90.,  -85.,  -80.,  -75.,  -70.,  -65.,  -60.,  -55.,  -50.,
        -45.,  -40.,  -35.,  -30.,  -25.,  -20.,  -15.,  -10.,   -5.,
          0.,    5.,   10.,   15.,   20.,   25.,   30.,   35.,   40.,
         45.,   50.,   55.,   60.,   65.,   70.,   75.,   80.,   85.,
         90.,   95.,  100.,  105.,  110.,  115.,  120.,  125.,  130.,
        135.,  140.,  145.,  150.,  155.,  160.,  165.,  170.,  175.], dtype=float32), 'bounds': [-180.0, 180.0, -90.0, 94.0, 0.0, 0.0], 'valueRange': (0.0, 100.0), 'scalars': 'clt', 'plotType': 'xyz', 'base_time': ['1979-1-1 0:0:0.0', '1979-2-1 0:0:0.0', '1979-3-1 0:0:0.0', '1979-4-1 0:0:0.0', '1979-5-1 0:0:0.0', '1979-6-1 0:0:0.0', '1979-7-1 0:0:0.0', '1979-8-1 0:0:0.0', '1979-9-1 0:0:0.0', '1979-10-1 0:0:0.0', '1979-11-1 0:0:0.0', '1979-12-1 0:0:0.0', '1980-1-1 0:0:0.0', '1980-2-1 0:0:0.0', '1980-3-1 0:0:0.0', '1980-4-1 0:0:0.0', '1980-5-1 0:0:0.0', '1980-6-1 0:0:0.0', '1980-7-1 0:0:0.0', '1980-8-1 0:0:0.0', '1980-9-1 0:0:0.0', '1980-10-1 0:0:0.0', '1980-11-1 0:0:0.0', '1980-12-1 0:0:0.0', '1981-1-1 0:0:0.0', '1981-2-1 0:0:0.0', '1981-3-1 0:0:0.0', '1981-4-1 0:0:0.0', '1981-5-1 0:0:0.0', '1981-6-1 0:0:0.0', '1981-7-1 0:0:0.0', '1981-8-1 0:0:0.0', '1981-9-1 0:0:0.0', '1981-10-1 0:0:0.0', '1981-11-1 0:0:0.0', '1981-12-1 0:0:0.0', '1982-1-1 0:0:0.0', '1982-2-1 0:0:0.0', '1982-3-1 0:0:0.0', '1982-4-1 0:0:0.0', '1982-5-1 0:0:0.0', '1982-6-1 0:0:0.0', '1982-7-1 0:0:0.0', '1982-8-1 0:0:0.0', '1982-9-1 0:0:0.0', '1982-10-1 0:0:0.0', '1982-11-1 0:0:0.0', '1982-12-1 0:0:0.0', '1983-1-1 0:0:0.0', '1983-2-1 0:0:0.0', '1983-3-1 0:0:0.0', '1983-4-1 0:0:0.0', '1983-5-1 0:0:0.0', '1983-6-1 0:0:0.0', '1983-7-1 0:0:0.0', '1983-8-1 0:0:0.0', '1983-9-1 0:0:0.0', '1983-10-1 0:0:0.0', '1983-11-1 0:0:0.0', '1983-12-1 0:0:0.0', '1984-1-1 0:0:0.0', '1984-2-1 0:0:0.0', '1984-3-1 0:0:0.0', '1984-4-1 0:0:0.0', '1984-5-1 0:0:0.0', '1984-6-1 0:0:0.0', '1984-7-1 0:0:0.0', '1984-8-1 0:0:0.0', '1984-9-1 0:0:0.0', '1984-10-1 0:0:0.0', '1984-11-1 0:0:0.0', '1984-12-1 0:0:0.0', '1985-1-1 0:0:0.0', '1985-2-1 0:0:0.0', '1985-3-1 0:0:0.0', '1985-4-1 0:0:0.0', '1985-5-1 0:0:0.0', '1985-6-1 0:0:0.0', '1985-7-1 0:0:0.0', '1985-8-1 0:0:0.0', '1985-9-1 0:0:0.0', '1985-10-1 0:0:0.0', '1985-11-1 0:0:0.0', '1985-12-1 0:0:0.0', '1986-1-1 0:0:0.0', '1986-2-1 0:0:0.0', '1986-3-1 0:0:0.0', '1986-4-1 0:0:0.0', '1986-5-1 0:0:0.0', '1986-6-1 0:0:0.0', '1986-7-1 0:0:0.0', '1986-8-1 0:0:0.0', '1986-9-1 0:0:0.0', '1986-10-1 0:0:0.0', '1986-11-1 0:0:0.0', '1986-12-1 0:0:0.0', '1987-1-1 0:0:0.0', '1987-2-1 0:0:0.0', '1987-3-1 0:0:0.0', '1987-4-1 0:0:0.0', '1987-5-1 0:0:0.0', '1987-6-1 0:0:0.0', '1987-7-1 0:0:0.0', '1987-8-1 0:0:0.0', '1987-9-1 0:0:0.0', '1987-10-1 0:0:0.0', '1987-11-1 0:0:0.0', '1987-12-1 0:0:0.0', '1988-1-1 0:0:0.0', '1988-2-1 0:0:0.0', '1988-3-1 0:0:0.0', '1988-4-1 0:0:0.0', '1988-5-1 0:0:0.0', '1988-6-1 0:0:0.0', '1988-7-1 0:0:0.0', '1988-8-1 0:0:0.0', '1988-9-1 0:0:0.0', '1988-10-1 0:0:0.0', '1988-11-1 0:0:0.0', '1988-12-1 0:0:0.0', '1989-1-1 0:0:0.0'], 'time': ['1979-1-1 0:0:0.0', '1979-2-1 0:0:0.0', '1979-3-1 0:0:0.0', '1979-4-1 0:0:0.0', '1979-5-1 0:0:0.0', '1979-6-1 0:0:0.0', '1979-7-1 0:0:0.0', '1979-8-1 0:0:0.0', '1979-9-1 0:0:0.0', '1979-10-1 0:0:0.0', '1979-11-1 0:0:0.0', '1979-12-1 0:0:0.0', '1980-1-1 0:0:0.0', '1980-2-1 0:0:0.0', '1980-3-1 0:0:0.0', '1980-4-1 0:0:0.0', '1980-5-1 0:0:0.0', '1980-6-1 0:0:0.0', '1980-7-1 0:0:0.0', '1980-8-1 0:0:0.0', '1980-9-1 0:0:0.0', '1980-10-1 0:0:0.0', '1980-11-1 0:0:0.0', '1980-12-1 0:0:0.0', '1981-1-1 0:0:0.0', '1981-2-1 0:0:0.0', '1981-3-1 0:0:0.0', '1981-4-1 0:0:0.0', '1981-5-1 0:0:0.0', '1981-6-1 0:0:0.0', '1981-7-1 0:0:0.0', '1981-8-1 0:0:0.0', '1981-9-1 0:0:0.0', '1981-10-1 0:0:0.0', '1981-11-1 0:0:0.0', '1981-12-1 0:0:0.0', '1982-1-1 0:0:0.0', '1982-2-1 0:0:0.0', '1982-3-1 0:0:0.0', '1982-4-1 0:0:0.0', '1982-5-1 0:0:0.0', '1982-6-1 0:0:0.0', '1982-7-1 0:0:0.0', '1982-8-1 0:0:0.0', '1982-9-1 0:0:0.0', '1982-10-1 0:0:0.0', '1982-11-1 0:0:0.0', '1982-12-1 0:0:0.0', '1983-1-1 0:0:0.0', '1983-2-1 0:0:0.0', '1983-3-1 0:0:0.0', '1983-4-1 0:0:0.0', '1983-5-1 0:0:0.0', '1983-6-1 0:0:0.0', '1983-7-1 0:0:0.0', '1983-8-1 0:0:0.0', '1983-9-1 0:0:0.0', '1983-10-1 0:0:0.0', '1983-11-1 0:0:0.0', '1983-12-1 0:0:0.0', '1984-1-1 0:0:0.0', '1984-2-1 0:0:0.0', '1984-3-1 0:0:0.0', '1984-4-1 0:0:0.0', '1984-5-1 0:0:0.0', '1984-6-1 0:0:0.0', '1984-7-1 0:0:0.0', '1984-8-1 0:0:0.0', '1984-9-1 0:0:0.0', '1984-10-1 0:0:0.0', '1984-11-1 0:0:0.0', '1984-12-1 0:0:0.0', '1985-1-1 0:0:0.0', '1985-2-1 0:0:0.0', '1985-3-1 0:0:0.0', '1985-4-1 0:0:0.0', '1985-5-1 0:0:0.0', '1985-6-1 0:0:0.0', '1985-7-1 0:0:0.0', '1985-8-1 0:0:0.0', '1985-9-1 0:0:0.0', '1985-10-1 0:0:0.0', '1985-11-1 0:0:0.0', '1985-12-1 0:0:0.0', '1986-1-1 0:0:0.0', '1986-2-1 0:0:0.0', '1986-3-1 0:0:0.0', '1986-4-1 0:0:0.0', '1986-5-1 0:0:0.0', '1986-6-1 0:0:0.0', '1986-7-1 0:0:0.0', '1986-8-1 0:0:0.0', '1986-9-1 0:0:0.0', '1986-10-1 0:0:0.0', '1986-11-1 0:0:0.0', '1986-12-1 0:0:0.0', '1987-1-1 0:0:0.0', '1987-2-1 0:0:0.0', '1987-3-1 0:0:0.0', '1987-4-1 0:0:0.0', '1987-5-1 0:0:0.0', '1987-6-1 0:0:0.0', '1987-7-1 0:0:0.0', '1987-8-1 0:0:0.0', '1987-9-1 0:0:0.0', '1987-10-1 0:0:0.0', '1987-11-1 0:0:0.0', '1987-12-1 0:0:0.0', '1988-1-1 0:0:0.0', '1988-2-1 0:0:0.0', '1988-3-1 0:0:0.0', '1988-4-1 0:0:0.0', '1988-5-1 0:0:0.0', '1988-6-1 0:0:0.0', '1988-7-1 0:0:0.0', '1988-8-1 0:0:0.0', '1988-9-1 0:0:0.0', '1988-10-1 0:0:0.0', '1988-11-1 0:0:0.0', '1988-12-1 0:0:0.0'], 'lat': array([-90., -86., -82., -78., -74., -70., -66., -62., -58., -54., -50.,
       -46., -42., -38., -34., -30., -26., -22., -18., -14., -10.,  -6.,
        -2.,   2.,   6.,  10.,  14.,  18.,  22.,  26.,  30.,  34.,  38.,
        42.,  46.,  50.,  54.,  58.,  62.,  66.,  70.,  74.,  78.,  82.,
        86.,  90.], dtype=float32), 'attributes': {'time_statistic': 'average', 'scale': (0.0, 1.0), 'date': '1979/1/1\x00', 'name': 'clt', 'title': 'Total cloudiness', 'tileIndex': None, 'comments': 'YONU_AMIP1', 'long_name': 'Total cloudiness', 'range': (0.0, 100.0), 'grid_name': 'YONU4X5', 'time': '0:0:0.0\x00', 'units': '%', 'grid_type': 'gaussian'}, 'datasetId': 'clt'}: unicode argument expected, got 'str'
 Can't get Metadata!
[InputSpecs]: Error, Metadata for input 0 not found in ispec[1221ef3b0]  
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-92ed0e225c30> in <module>()
----> 1 x.plot(s,sc)

/Users/doutriaux1/anaconda2/envs/nightly_py2/lib/python2.7/site-packages/vcs/Canvas.pyc in plot(self, *actual_args, **keyargs)
   2781 
   2782         # Plot the data
-> 2783         a = self.__plot(arglist, keyargs)
   2784 
   2785         if "continents_line" in keyargs:

/Users/doutriaux1/anaconda2/envs/nightly_py2/lib/python2.7/site-packages/vcs/Canvas.pyc in __plot(self, arglist, keyargs)
   4125                         **keyargs)
   4126             else:
-> 4127                 returned_kargs = self.backend.plot(*arglist, **keyargs)
   4128                 if not keyargs.get("donotstoredisplay", False):
   4129                     dname = keyargs.get("display_name")

/Users/doutriaux1/anaconda2/envs/nightly_py2/lib/python2.7/site-packages/vcs/VTKPlots.pyc in plot(self, data1, data2, template, gtype, gname, bg, *args, **kargs)
    690                 gm.addPlotAttribute('filename', cdms_file)
    691                 gm.addPlotAttribute('url', cdms_file)
--> 692             returned.update(self.plot3D(data1, data2, tpl, gm, ren, **kargs))
    693         elif gtype in ["text"]:
    694             if tt.priority != 0:

/Users/doutriaux1/anaconda2/envs/nightly_py2/lib/python2.7/site-packages/vcs/VTKPlots.pyc in plot3D(self, data1, data2, tmpl, gm, ren, **kargs)
    794                 gmname=gm.g_name,
    795                 cm=gm.cfgManager,
--> 796                 **kargs)  # , plot_type = PlotType.List  )
    797             self.plotApps[gm] = g
    798             self.plotRenderers.add(g.plot.renderer)

/Users/doutriaux1/anaconda2/envs/nightly_py2/lib/python2.7/site-packages/DV3D/Application.pyc in gminit(self, var1, var2, **args)
     63             if self.plot == None:
     64                 self.plot = RectGridPlot(**args)
---> 65                 self.plot.gminit( var1, var2, **args )
     66                 self.plot.ParameterValueChanged.connect(self.canvas.processParameterChange)
     67             else:

/Users/doutriaux1/anaconda2/envs/nightly_py2/lib/python2.7/site-packages/DV3D/StructuredGridPlot.pyc in gminit(self, var1, var2, **args)
    644             self.cfgManager = args["cm"]
    645         self.createRenderer( **args )
--> 646         self.execute( )
    647         self.initializePlots()
    648         self.initCamera()

/Users/doutriaux1/anaconda2/envs/nightly_py2/lib/python2.7/site-packages/DV3D/StructuredGridPlot.pyc in execute(self, **args)
    237         if not self.isBuilt():
    238             self.initializeInputs()
--> 239             self.buildPipeline()
    240             self.buildBaseMap()
    241             self.fetchPlotButtons()

/Users/doutriaux1/anaconda2/envs/nightly_py2/lib/python2.7/site-packages/DV3D/RectilinearGridPlot.pyc in buildPipeline(self)
    978         # Create transfer mapping scalar value to opacity
    979         self.opacityTransferFunction = vtk.vtkPiecewiseFunction()
--> 980         self.setMaxScalarValue( self.input().GetScalarType() )
    981 
    982 #        self.contourInput = None if contourModule == None else contourModule.getOutput()

/Users/doutriaux1/anaconda2/envs/nightly_py2/lib/python2.7/site-packages/DV3D/StructuredGridPlot.pyc in setMaxScalarValue(self, iDType)
    142         elif iDType == vtk.VTK_UNSIGNED_SHORT:  self._max_scalar_value = 256*256-1
    143         elif iDType == vtk.VTK_SHORT:           self._max_scalar_value = 256*128-1
--> 144         else:                                   self._max_scalar_value = self.getRangeBounds()[1]
    145 
    146     def decimateImage( self, image, decx, decy ):

TypeError: 'NoneType' object has no attribute '__getitem__'
@scottwittenburg

This comment has been minimized.

Contributor

scottwittenburg commented Mar 1, 2018

Near the top of that output, in the Error pickling object ... message, if you scroll far to the right, you can see the following:

unicode argument expected, got 'str'

So is this perhaps addressed by (or just related to) the recent str/unicode fixes?

@doutriaux1 doutriaux1 closed this Mar 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment