[IPython-User] using %run confuses stderr (makes it to post everything twice, 3, 4, 5 times..)

Ilia Chinkarev ilia.chinkarev@gmail....
Tue Feb 4 19:02:40 CST 2014


thank you for so quick reply.

I am not explicitly using logging. I don't think so. But potentially MrJob
script that I am running - it could potentially use the logging. But it's
under the hood.

Is there any way to {manually} disconnect the handlers after the each run?


On Tue, Feb 4, 2014 at 5:57 PM, MinRK <benjaminrk@gmail.com> wrote:

> Are you using logging? If so, it's easy to accidentally connect new
> handlers on each run, which will duplicate output (and logging goes to
> stderr by default).
>
> -MinRK
>
>
> On Tue, Feb 4, 2014 at 4:53 PM, Ilia Chinkarev <ilia.chinkarev@gmail.com>wrote:
>
>> Dear all,
>>
>> When I am using %run to run my scripts, I see a rather weird phenomena:
>>
>> When I run it for the first time - everything works as expected.
>>
>>  When I run it more than 1 time, the stderr output (the red/pink one) is
>> starting to duplicate itself. It's much easier to post a screenshot, than
>> to explain, so please see the attached screenshot.
>>
>>  But in words, it's like this: Every line would repeat itself next time
>> I run it. So this:
>>
>>
>> no configs found; falling back on auto-configuration
>> no configs found; falling back on auto-configuration
>>
>>
>> creating tmp directory c:\users\ilia\appdata\local\temp\MrJobTest.ilia.20140205.004723.604000
>>
>>
>> writing to c:\users\ilia\appdata\local\temp\MrJobTest.ilia.20140205.004723.604000\step-0-mapper_part-00000
>>
>>
>> Would become this:
>>
>>
>>
>> no configs found; falling back on auto-configuration
>> no configs found; falling back on auto-configuration
>>
>>
>> no configs found; falling back on auto-configuration
>> no configs found; falling back on auto-configuration
>>
>>
>> creating tmp directory c:\users\ilia\appdata\local\temp\MrJobTest.ilia.20140205.004723.604000
>>
>>
>> creating tmp directory c:\users\ilia\appdata\local\temp\MrJobTest.ilia.20140205.004723.604000
>>
>>
>> writing to c:\users\ilia\appdata\local\temp\MrJobTest.ilia.20140205.004723.604000\step-0-mapper_part-00000
>>
>>
>> writing to c:\users\ilia\appdata\local\temp\MrJobTest.ilia.20140205.004723.604000\step-0-mapper_part-00000
>>
>>
>>
>> Even if this is a bug, I was wondering is there any way to avoid it or to shortcut it, except shutting down the kernel and starting it again. It works, but it's very tedious.
>>
>>
>> Thank you all very much in advance.
>>
>>
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>
>>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20140204/ab536519/attachment-0001.html 


More information about the IPython-User mailing list