aurora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Chu-Carroll (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AURORA-12) thermos.py trying to len() a generator
Date Tue, 17 Dec 2013 18:18:07 GMT

    [ https://issues.apache.org/jira/browse/AURORA-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13850735#comment-13850735
] 

Mark Chu-Carroll commented on AURORA-12:
----------------------------------------

Proposed fix in https://reviews.apache.org/r/16326/


> 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
>            Priority: Minor
>
> 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)

Mime
View raw message