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

isofill broken for discontinued #1734

Closed
doutriaux1 opened this Issue Dec 11, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@doutriaux1
Member

doutriaux1 commented Dec 11, 2015

import vcs
import os,sys
import cdms2


f=cdms2.open(os.path.join(vcs.sample_data,"clt.nc"))

s=f("clt")

x=vcs.init()

iso = x.createisofill()

iso.levels = [[0,10],[20,30],[40,60],[80,100]]

x.plot(s,iso)

raw_input("press enter")

leads to:

Traceback (most recent call last):
  File "/git/uvcdat/testing/vcs/test_not_contiguous.py", line 16, in <module>
    x.plot(s,iso)
  File "/lgm/uvcdat/2015-12-07/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 2417, in plot
    a = self.__plot(arglist, keyargs)
  File "/lgm/uvcdat/2015-12-07/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.py", line 3740, in __plot
    returned_kargs = self.backend.plot(*arglist, **keyargs)
  File "/lgm/uvcdat/2015-12-07/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/VTKPlots.py", line 528, in plot
    vtk_backend_grid, vtk_backend_geo))
  File "/lgm/uvcdat/2015-12-07/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/vcsvtk/pipeline2d.py", line 246, in plot
    self._updateContourLevelsAndColors()
  File "/lgm/uvcdat/2015-12-07/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/vcsvtk/isofillpipeline.py", line 68, in _updateContourLevelsAndColors
    self._contourColors = vcs.getcolors(levs2, split=0)
UnboundLocalError: local variable 'levs2' referenced before assignment

Apparently @dlonie did forsee this 😉 https://github.com/UV-CDAT/uvcdat/blob/master/Packages/vcs/Lib/vcsvtk/isofillpipeline.py#L67-Lundefined

@doutriaux1 doutriaux1 self-assigned this Dec 11, 2015

@doutriaux1 doutriaux1 added this to the 2.4 milestone Dec 11, 2015

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Dec 11, 2015

@aashish24 @sankhesh @danlipsa @chaosphere2112 this is an important new issue

doutriaux1 added a commit that referenced this issue Dec 11, 2015

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