<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gsf_zero1</author_name>
  <author_url>https://blog.hatena.ne.jp/gsf_zero1/</author_url>
  <blog_title>いろいろ備忘録日記</blog_title>
  <blog_url>https://devlights.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>概要 python で sshとかsftp処理しようとすると大抵出て来る paramiko モジュールさん。 超便利なのですが、sshでやり取りする処理を書いて 標準出力を受け取ろうとすると、UnicodeDecodeError が発生するときがあります。 なんでなのかというと、paramiko内部処理の exec_command 関数にて stdin のみがバイナリモードで、stdoutとstderrがテキストモードで処理しようとしているためです。 たまたま、euc-jpなlinuxマシン用に処理書いててエラーが発生したので知りました。 で、ソースみてみると、モードの部分はパラメータにもなっ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdevlights.hatenablog.com%2Fentry%2F2017%2F06%2F29%2F184934&quot; title=&quot;Pythonメモ-16 (paramiko, ssh, UnicodeDecodeError, stdoutとstderrがテキストモード, monkey_patch関数) - いろいろ備忘録日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-06-29 18:49:34</published>
  <title>Pythonメモ-16 (paramiko, ssh, UnicodeDecodeError, stdoutとstderrがテキストモード, monkey_patch関数)</title>
  <type>rich</type>
  <url>https://devlights.hatenablog.com/entry/2017/06/29/184934</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
