Skip to content
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

viewport error for polar map projection #262

lee1043 opened this issue Oct 3, 2017 · 1 comment

viewport error for polar map projection #262

lee1043 opened this issue Oct 3, 2017 · 1 comment


Copy link

lee1043 commented Oct 3, 2017

I was following the tutorial but setting polar map projection returns viewpoint error. It happened on Crunchy, but when I was running this on my Mac it was fine.

import cdms2, vcs'')
box = vcs.createboxfill()
box.projection = 'polar'
x.plot(s, box)


Traceback (most recent call last):
  File "", line 8, in <module>
    x.plot(s, box)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 2690, in plot
    a = self.__plot(arglist, keyargs)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 4020, in __plot
    returned_kargs = self.backend.plot(*arglist, **keyargs)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 680, in plot
    vtk_backend_grid, vtk_backend_geo, **kargs))
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/vcsvtk/", line 326, in plot
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/vcsvtk/", line 159, in _plotInternal
    self._gm, t, z, **kwargs))
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 866, in renderTemplate
    displays = tmpl.plot(self.canvas, data, gm,, X=X, Y=Y, **kargs)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 1759, in plot
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 1115, in drawTicks
    tt.viewport = vp
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 56, in __setattr__
    super(bestMatch, self).__setattr__(a, v)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 323, in _setviewport
    self.Tt.viewport = value
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 56, in __setattr__
    super(bestMatch, self).__setattr__(a, v)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 354, in _setvp
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 242, in checkListOfNumbers
    checkNumber(self, name, v, minvalue=minvalue, maxvalue=maxvalue)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 181, in checkNumber
    checkedRaise(self, value, ValueError, name + ' must be a number')
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/", line 59, in checkedRaise
    raise ex(err)
ValueError: viewport must be a number

VCS version

(uvcdat-2.12) -bash-4.1$ conda list vcs
# packages in environment at /export_backup/lee1043/anaconda2/envs/uvcdat-2.12:
vcs                       2.12             py27had75802_0    uvcdat
vcsaddons                 2.12             py27h7706516_0    uvcdat
Copy link
Contributor Author

lee1043 commented Oct 3, 2017

Created a new conda env with pmp and latest vcs, then problem solved. Thanks to @doutriaux1

conda create -n pmp_nightly -c uvcdat/label/nightly -c conda-forge -c 
uvcdat -c pcmdi/label/nightly -c pcmdi pcmdi_metrics


@lee1043 lee1043 closed this as completed Oct 3, 2017
@doutriaux1 doutriaux1 self-assigned this Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants