Sorry, my mistake. The method should take just one argument like this:

@validate('notebook_dir')
def _validate_notebook_dir(self, proposal):
    value = proposal['value']
    ...

On 15 August 2017 at 15:50, Craig Ching <craigch...@gmail.com> wrote:

> Hi takowl!
>
> Thanks much for your help!
>
> On Monday, August 14, 2017 at 4:43:04 AM UTC-5, takowl wrote:
>>
>>
>> from traitlets import validate
>>
>> class MySpawner(LocalProcessSpawner):
>>     @validate('notebook_dir')
>>     def _notebook_dir_validate(self, value, trait):
>>     ...
>>
>>
> I've done that, but now I'm getting:
>
> TypeError: _notebook_dir_validate() missing 1 required positional
> argument: 'trait'
>
> I've tried looking through the source code to see if I have the arguments
> defined correctly, but I'm afraid I'm not that strong at Python yet.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/f995498e-a94d-4ce3-8e79-d5b45765ebed%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/f995498e-a94d-4ce3-8e79-d5b45765ebed%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOvn4qhkqVdhen6eewGPs2u4JeUFvJnvq4qkQFdnYuJJXDKwkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to