14

LocalTargetプロジェクトの Luigi パイプラインでバイナリを作成するのに問題があります。ここで問題を切り分けました:

class LuigiTest(luigi.Task):
    def output(self):
        return luigi.LocalTarget('test.npz')

    def run(self):
        with self.output().open('wb') as fout:
            np.savez_compressed(fout, array=np.asarray([1, 2, 3]))

として開いてみまし'w''wb'が、次のエラーが引き続き発生します。

TypeError: write() argument must be str, not bytes

私はpython 3.5.1を使用しており、ルイージのバージョンは2.1.1です

4

2 に答える 2