Code Monkey home page Code Monkey logo

Comments (6)

houxiyao avatar houxiyao commented on July 29, 2024

https://help.aliyun.com/document_detail/88432.htm?spm=a2c4g.11186623.0.0.7f602cb7Y726I0#concept-88432-zh

from ossfs.

houxiyao avatar houxiyao commented on July 29, 2024

Pandas通过fsspec上传大文件是触发了PositionNotEqualToLength

from ossfs.

karajan1001 avatar karajan1001 commented on July 29, 2024

Excuse me, could you please provide some more details? how to reproduce this error? Uploading large files, and what does the Pandas do here?

from ossfs.

rgtjf avatar rgtjf commented on July 29, 2024

I use fsspec with zstd compressor, and encounter the same issues when the object size raises to 5M.

python=3.10 and ossfs=2023.6.0

import json
import fsspec
import ossfs
import sys

#import ossfs.base as ob
#ob.DEFAULT_BLOCK_SIZE = 5 * 2 ** 30
import random
import string


N = 2**20
res = ''.join(random.choices(string.ascii_uppercase + string.digits, k=N))
print(sys.getsizeof(res) / 2**20)

with fsspec.open("oss://personal-cn/junfeng/t1.jsonl.zst", mode="wb", compression="zstd", encoding="utf-8") as f: 
    lines = ''
    for i in range(100):
        line = ''.join(random.choices(string.ascii_uppercase + string.digits, k=N))
        lines += line
        f.write(line.encode("utf-8"))
        print(i, sys.getsizeof(lines) / 2**20)

OSError: [Errno 5] {'status': 409, 'x-oss-request-id': '6541DDD3D832763531ABC4C5', 'details': {'Code': 'PositionNotEqualToLength', 'Message': 'Position is not equal to file length', 'RequestId': '6541DDD3D832763531ABC4C5', 'HostId': 'personal-cn.oss-cn-wulanchabu-internal.aliyuncs.com', 'EC': '0026-00000016', 'RecommendDoc': 'https://api.aliyun.com/troubleshoot?q=0026-00000016'}}

Last, the size of the stored file is about 5.1M.

from ossfs.

rgtjf avatar rgtjf commented on July 29, 2024

When changing self.loc to self.offset it would be ok.

from ossfs.

idling11 avatar idling11 commented on July 29, 2024

When changing self.loc to self.offset it would be ok.

it looks like the same error with issue 127

from ossfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.