Skip to content

genutil errors should be wrapped in [] #1663

New issue

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

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

Already on GitHub? # to your account

Open
durack1 opened this issue Nov 5, 2015 · 0 comments
Open

genutil errors should be wrapped in [] #1663

durack1 opened this issue Nov 5, 2015 · 0 comments
Labels

Comments

@durack1
Copy link
Member

durack1 commented Nov 5, 2015

The following errors are difficult to read and it should be a relatively easy fix to wrap the string in [] so they display more clearly:

In [7]: rms = genutil.statistics.rms(s[0],s[-1],axis='xyt')
---------------------------------------------------------------------------
StatisticsError                           Traceback (most recent call last)
<ipython-input-7-561f9ca97f6a> in <module>()                               
----> 1 rms = genutil.statistics.rms(s[0],s[-1],axis='xyt')                
/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/genutil/statistics.pyc in rms(x, y, weights, axis, centered, biased, max_pct_missing)                                                                                                                              
    876     cdat_info.pingPCMDIdb("cdat","genutil.statistics.rms")                                                                   
    877     if cdms2.isVariable(x) : xatt=x.attributes                                                                               
--> 878     x,y,weights,axis,ax=__checker(x,y,weights,axis)                                                                          
    879     rmsans=__rms(x,y,weights=weights,centered=centered,biased=biased)                                                      
    880     rmsans=_treat_missing(rmsans,x,max_pct_missing=max_pct_missing)                                                      
/usr/local/uvcdat/2.4.0rc1/lib/python2.7/site-packages/genutil/statistics.pyc in __checker(x, y, w, axes, smally)
    629                                 axesparse[i]=j                                                           
    630                     if type(axesparse[i])==type(''): # Everything failed the axis id must be not existing in the slab...
--> 631                         raise StatisticsError,'Error axis id :'+o+' not found in first slab: '+x.getOrder(ids=1)        
    632             axes=axesparse                                                                                              
    633     # Now we have array those shape match, and a nice list of axes let's keep going                                     
StatisticsError: ('E', 'r', 'r', 'o', 'r', ' ', 'a', 'x', 'i', 's', ' ', 'i', 'd', ' ', ':', 't', ' ', 'n', 'o', 't', ' ', 'f', 'o', 'u', 'n', 'd', ' ', 'i', 'n', ' ', 'f', 'i', 'r', 's', 't', ' ', 's', 'l', 'a', 'b', ':', ' ', 'y', 'x') 
@durack1 durack1 added the cdutil label Nov 10, 2015
@durack1 durack1 added this to the 3.0 milestone Nov 13, 2015
@doutriaux1 doutriaux1 modified the milestones: 3.0, 3.2 Mar 29, 2019
@downiec downiec removed this from the 8.2 milestone Jul 27, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants