LoginSignup
0
0

python subprocess cannot use a string pattern on a bytes-like object

Posted at

encoding='utf8'を追加する

 proc_result = subprocess.Popen(cmdargs,
                                        stdin=subprocess.PIPE,
                                        stdout=subprocess.PIPE,
                                        stderr=subprocess.PIPE,
                                        startupinfo=_no_window,
                                        encoding='utf8').communicate()[0]

            # No tx update required
            if rx_maketx_noupdate.search(proc_result):
                message = 'No update required: %s (%s)' % (out_tile_tx, tile)
                logger.info(message)
                results.append({'info': message, 'src': tile, 'tx': out_tile_tx, 'status': 'no_update_required'})
                continue
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0