[Tutor] "List" object is not callable

bob gailer bgailer at gmail.com
Sat Apr 30 17:27:36 EDT 2016


On 4/30/2016 3:27 PM, Alex Kleider wrote:
>
>
> On 2016-04-30 11:51, Jason N. via Tutor wrote:
>> Hello,
>> I found this simple script online but when I execute it I get the
>> following error: "TypeError: 'list' object is not callable"
>> Here is the code sample:import subprocess
>>
>> ls_output= subprocess.check_output(['dir'])
> It works on my system: Ubuntu 14.04LTS
Works on my Windows 10 also.

Always post the traceback. The problem must lie in check_output as there 
is nothing in your code that could raise that exception.



More information about the Tutor mailing list