0

我需要阅读 AWS 胶水中的 cobol 模式。下面代码出现错误 OSError: [Errno 36] File name too long

import stingray.cobol.loader
import stingray.cobol
import io
from io import StringIO
import boto3
import json
import pandas as pd
import tempfile
import python_cobol as cob
import pprint



s3 = boto3.client('s3')
s3file = s3.get_object(Bucket = 'bucket_name' , Key= 'path')

with open(s3file['Body'].read().decode('utf-8'), 'r') as copybook:
    schema = stingray.cobol.loader.COBOLSchemaLoader(copybook).load()
pprint.pprint(schema)
4

0 回答 0