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

XvsY error #1620

Closed
chaosphere2112 opened this Issue Oct 19, 2015 · 10 comments

Comments

Projects
None yet
4 participants
@chaosphere2112
Contributor

chaosphere2112 commented Oct 19, 2015

import cdms2, vcs
x = vcs.init()
f = cdms2.open(vcs.sample_data + "/clt.nc")
x.xvsy(f("v"), f("clt"))

gives:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-2-b691057b570d> in <module>()
----> 1 x.xvsy(v, s)

/Users/fries2/build-uvcdat/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.pyc in xvsy(self, *args, **parms)
   1705 """
   1706         arglist = _determine_arg_list('xvsy', args)
-> 1707         return self.__plot(arglist, parms)
   1708     xvsy.__doc__ = xvsy.__doc__ % (plot_keywords_doc,
   1709                                    graphics_method_core,

/Users/fries2/build-uvcdat/install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/vcs/Canvas.pyc in __plot(self, arglist, keyargs)
   3498                 elif tp == "default":
   3499                     tp = "boxfill"
-> 3500                 gm = vcs.elements[tp][arglist[4]]
   3501                 if hasattr(gm, "priority") and gm.priority == 0:
   3502                     return

KeyError: '__xvsy_653912073685959_xvsy_'
@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Oct 19, 2015

Actually this shouldn't work because the shape won't match, but it's definitely crashing first for another reason.

@williams13

This comment has been minimized.

Contributor

williams13 commented Oct 19, 2015

No it shouldn’t work, but it shouldn’t crash either. Just doing typical user things…

From: Charles Doutriaux <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Monday, October 19, 2015 at 9:46 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Subject: Re: [uvcdat] XvsY error (#1620)

Actually this shouldn't work because the shape won't match, but it's definitely crashing first for another reason.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1620#issuecomment-149277137.

@chaosphere2112 chaosphere2112 added this to the 2.4 milestone Oct 29, 2015

doutriaux1 added a commit that referenced this issue Nov 10, 2015

fix #1620
test case in place
@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Nov 10, 2015

@chaosphere2112 your example at the top still fails for me in master.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Nov 10, 2015

  File "/git/uvcdat/testing/vcs/test_vcs_1d_fails_2_slabs.py", line 5, in <module>
    x.xvsy([1,2,3,4],[1,2,3,4],bg=False)
  File "/lgm/uvcdat/2015-11-09/lib/python2.7/site-packages/vcs/Canvas.py", line 1707, in xvsy
    return self.__plot(arglist, parms)
  File "/lgm/uvcdat/2015-11-09/lib/python2.7/site-packages/vcs/Canvas.py", line 3500, in __plot
    gm = vcs.elements[tp][arglist[4]]
KeyError: '__1d_64410090437423'
@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Nov 10, 2015

@chaosphere2112

x.xvsy([1,2,3,4],[1,2,3,4],bg=False)

that should work

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Nov 10, 2015

@chaosphere2112 I will let you finish #1621 before completing the part where shapes mismatch

@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Nov 10, 2015

@doutriaux1 Ah, I fixed the problem for .plot, not the specific graphics-method plot functions. I'll get another PR up for those.

doutriaux1 added a commit that referenced this issue Nov 10, 2015

fix #1620
test case in place
@aashish24

This comment has been minimized.

Contributor

aashish24 commented Nov 13, 2015

@doutriaux1 @chaosphere2112 can we close this issue?

@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Nov 13, 2015

@aashish24 Not until #1669 is merged.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Nov 13, 2015

okay, thanks @chaosphere2112

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