FTP 経由で転送した後にファイルが不適切に整列される

FTP 経由で転送した後にファイルが不適切に整列される

Ubuntu 16.04 ボックス (外部サーバー) があり、そこには Python ファイルがたくさんあります。これらのファイルをローカル マシンに FTP で転送して Python ファイルを開こうとすると、コードが適切に配置されません。

転送中にアライメントが破損すると思われます。

この問題を解決するにはどうすればいいですか? 私は Mac を使用しており、cyberduckこれらのファイルを転送しています。

コードを FTP した後、try ステートメントの位置がずれていることに気付いたかもしれません。これは単なるスナップショットです。多くの行が適切に位置合わせされていません。

    for pano in test_images:
    import time
    #time.sleep(30)
    print "Reading ",pano
    t_start = dt.datetime.now()
        try:
            orig_img = cv2.imread(pano)[:,:,:3]
            '''
            round_y = orig_img.shape[0]%J["h_stride"]
            r_y = J["h_stride"]-round_y if round_y > J["h_stride"]/2 else -round_y
            round_x = orig_img.shape[1]%J["w_stride"]
            r_x = J["w_stride"]-round_x if round_x > J["w_stride"]/2 else -round_x
            orig_img = imresize(orig_img, ( orig_img.shape[0]+round_y, orig_img.shape[0]+round_x) )
            '''
        except:
            continue

リモートファイル:

for pano in test_images:
            import time
            #time.sleep(30)
            print "Reading ",pano
            t_start = dt.datetime.now()
            try:
                orig_img = cv2.imread(pano)[:,:,:3]
                '''
                round_y = orig_img.shape[0]%J["h_stride"]
                r_y = J["h_stride"]-round_y if round_y > J["h_stride"]/2 else -round_y
                round_x = orig_img.shape[1]%J["w_stride"]
                r_x = J["w_stride"]-round_x if round_x > J["w_stride"]/2 else -round_x
                orig_img = imresize(orig_img, ( orig_img.shape[0]+round_y, orig_img.shape[0]+round_x) )
                '''
            except:
                continue

関連情報