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

Closed
lee1043 opened this issue Oct 3, 2017 · 1 comment
Closed

viewport error for polar map projection #262

lee1043 opened this issue Oct 3, 2017 · 1 comment
Assignees
Labels

Comments

@lee1043
Copy link
Contributor

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
f=cdms2.open('clt.nc')
s=f('clt')
x=vcs.init()
box = vcs.createboxfill()
box.projection = 'polar'
x.plot(s, box)
x.png('test.png')

Error:

Traceback (most recent call last):
  File "test_plot.py", line 8, in <module>
    x.plot(s, box)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/Canvas.py", line 2690, in plot
    a = self.__plot(arglist, keyargs)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/Canvas.py", 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/VTKPlots.py", 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/pipeline2d.py", line 326, in plot
    self._plotInternal()
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/vcsvtk/boxfillpipeline.py", line 159, in _plotInternal
    self._gm, t, z, **kwargs))
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/VTKPlots.py", line 866, in renderTemplate
    displays = tmpl.plot(self.canvas, data, gm, bg=self.bg, X=X, Y=Y, **kargs)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/template.py", line 1759, in plot
    **kargs)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/template.py", line 1115, in drawTicks
    tt.viewport = vp
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/__init__.py", 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/textcombined.py", line 323, in _setviewport
    self.Tt.viewport = value
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/__init__.py", 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/texttable.py", line 354, in _setvp
    maxvalue=1.)
  File "/export_backup/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/VCS_validation_functions.py", 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/VCS_validation_functions.py", 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/VCS_validation_functions.py", 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
@lee1043
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

test

@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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants