[pyar] Memory Profiling

Javier Marcon javiermarcon en gmail.com
Jue Jun 12 18:52:59 ART 2014


El 12/06/14 16:58, Claudio Freire escribió:
> 2014-06-12 16:40 GMT-03:00 Javier Marcon <javiermarcon en gmail.com>:
>> El tema es que al correrlo cuando tendría que grabar chain.png, me tira este
>> error:
>>
>> Traceback (most recent call last):
>>   File "C:\Users\Administrador\Desktop\clase_bajar.py", line 116, in
>> download
>>     random.choice(objgraph.by_type('clase_bajar')),
>>   File "C:\Python27\lib\random.py", line 274, in choice
>>     return seq[int(self.random() * len(seq))]  # raises IndexError if seq is
>> empty
>> IndexError: list index out of range
>>
>> A alguien le paso esto?
>
>>>> import random
>>>> random.choice([])
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib64/python2.7/random.py", line 273, in choice
>     return seq[int(self.random() * len(seq))]  # raises IndexError if
> seq is empty
> IndexError: list index out of range
>
>
> Tu objgraph está vacío
>
Gracias, pero no entiendo como puede estar vacío, si en la linea
anteriór funcionó el objgraph.show_growth(limit=20)

Gracias,

Javier.


More information about the pyar mailing list