enthought / enthought/traits

minlen not present on TraitInstance

Open
#1,591 5 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Python
Stars
462
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Loving traits! I have created a wrapper class that does some pretty printing among other things. I'm getting the following error when of my classes attributes is a List():

``` python

File "C:\Users\jeff\anaconda3\envs\dev\lib\site-packages\traits\trait_list_object.py", line 580, in __init__
self._validate_length(len(value))

File "C:\Users\jeff\anaconda3\envs\dev\lib\site-packages\traits\trait_list_object.py", line 889, in _validate_length
if not trait.minlen <= new_length <= trait.maxlen:

AttributeError: 'TraitInstance' object has no attribute 'minlen'
```

It's probably something I'm doing wrong, so let me know if you need more information from me. Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.