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

isof.fillareacolors does not like rgb tuple in list of colors #206

Closed
doutriaux1 opened this Issue Jun 29, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@doutriaux1
Member

doutriaux1 commented Jun 29, 2017

import vcs
gm = vcs.createisofill()
gm.fillareacolors = [ 45, 46, [255,255,255],56]

leads to

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-043c6fd1e783> in <module>()
      1 gm = vcs.createisofill()
----> 2 gm.fillareacolors = [ 45, 46, [255,255,255],56]

/git/vcs/vcs/__init__.pyc in __setattr__(self, a, v)
     54     def __setattr__(self, a, v):
     55         if not hasattr(self, "__slots__") or a in self.__slots__:
---> 56             super(bestMatch, self).__setattr__(a, v)
     57         else:
     58             matches = difflib.get_close_matches(a, self.__slots__)

/git/vcs/vcs/VCS_validation_functions.pyc in _setfillareacolors(self, value)
   2121             self,
   2122             'fillareacolors',
-> 2123             value)
   2124     self._fillareacolors = value
   2125 fillareacolors = property(_getfillareacolors, _setfillareacolors)  # noqa

/git/vcs/vcs/VCS_validation_functions.pyc in checkColorList(self, name, value)
    776                 '_list_value',
    777                 v,
--> 778                 NoneOk=True))
    779     return returned_values
    780 

/git/vcs/vcs/VCS_validation_functions.pyc in checkColor(self, name, value, NoneOk)
    750                                    minvalue=0, maxvalue=100.,
    751                                    minelements=3,
--> 752                                    maxelements=4)
    753         if len(value) == 3:
    754             value.append(100.)

/git/vcs/vcs/VCS_validation_functions.pyc in checkListOfNumbers(self, name, value, minvalue, maxvalue, minelements, maxelements, ints)
    240             checkInt(self, name, v, minvalue=minvalue, maxvalue=maxvalue)
    241         else:
--> 242             checkNumber(self, name, v, minvalue=minvalue, maxvalue=maxvalue)
    243     return list(value)
    244 

/git/vcs/vcs/VCS_validation_functions.pyc in checkNumber(self, name, value, minvalue, maxvalue)
    195             name +
    196             ' values must be at most ' +
--> 197             str(maxvalue))
    198     return value
    199 

/git/vcs/vcs/VCS_validation_functions.pyc in checkedRaise(self, value, ex, err)
     57     if vcs._doValidation:
     58         if err is not None:
---> 59             raise ex(err)
     60         else:
     61             raise ex

ValueError: fillareacolors_list_value values must be at most 100.0

@doutriaux1 doutriaux1 added the bug label Jun 29, 2017

@doutriaux1 doutriaux1 added this to the 2.10.2 milestone Jun 29, 2017

@doutriaux1 doutriaux1 added invalid and removed bug labels Jul 12, 2017

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Jul 12, 2017

Doh! values need to be between 0 and 100... .

@doutriaux1 doutriaux1 closed this Jul 12, 2017

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