You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aurora.apache.org by "Zameer Manji (JIRA)" <ji...@apache.org> on 2013/12/17 03:25:07 UTC

[jira] [Assigned] (AURORA-12) thermos.py trying to len() a generator

     [ https://issues.apache.org/jira/browse/AURORA-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zameer Manji reassigned AURORA-12:
----------------------------------

    Assignee: brian wickman

I'm not sure if this is a bug, but I am assigning this to Brian. It seems either this is a legit bug we need to fix or our documentation is misleading and out of date.

> thermos.py trying to len() a generator
> --------------------------------------
>
>                 Key: AURORA-12
>                 URL: https://issues.apache.org/jira/browse/AURORA-12
>             Project: Aurora
>          Issue Type: Bug
>          Components: Thermos
>         Environment: python 2.6, linux 3.2.12-3.2.4.amzn1.x86_64
>            Reporter: Tim Julien
>            Assignee: brian wickman
>
> In the thermos README (https://github.com/apache/incubator-aurora/tree/master/src/main/python/twitter/thermos/README.md) there is an example simple.thermos:
> process = Process(name = 'simple', cmdline = 'echo hello world')
> task = Task(name = 'simple', processes = [process])
> export(task)
> When you try to run it, you see that a generator is being returned where a list is expected:
> $ ./thermos.pex run --task=simple simple.thermos
> Writing log files to disk in /var/tmp
> Traceback (most recent call last):
>   File "/lib/python2.6/site-packages/twitter/common/app/application.py", line 738, in _wrap_method
>     return_code = method()
>   File "/lib/python2.6/site-packages/twitter/common/app/application.py", line 760, in <lambda>
>     main = lambda: main_method(*args, **kwargs)
>   File "twitter/thermos/bin/thermos.py", line 183, in run
>   File "twitter/thermos/bin/thermos.py", line 61, in get_task_from_options
> TypeError: object of type 'generator' has no len()



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)