Skip to content

gridfs.errors.CorruptGridFile: no chunk #0 #21

@xxzk

Description

@xxzk

Hello,

Executing the python script like below

python3 ./migrate.py -c dump -r rocketchat -t FileSystem -d /root/gridfs_dump/

And here is the return error.

Traceback (most recent call last):
  File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 755, in next
    chunk = self._next_with_retry()
  File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 747, in _next_with_retry
    return self._cursor.next()
  File "/usr/local/lib64/python3.6/site-packages/pymongo/cursor.py", line 1215, in next
    raise StopIteration
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./migrate.py", line 229, in <module>
    obj.dumpfiles("rocketchat_uploads", store)
  File "./migrate.py", line 104, in dumpfiles
    data = res.read()
  File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 565, in read
    chunk_data = self.readchunk()
  File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 528, in readchunk
    chunk = self.__chunk_iter.next()
  File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 759, in next
    raise CorruptGridFile("no chunk #%d" % self._next_chunk)
gridfs.errors.CorruptGridFile: no chunk #0

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions