Skip to content

'JsonSourceFile' object has no attribute 'bytes_processed' when using restore #280

@brimimc

Description

@brimimc

Describe the bug
When running a rethinkdb restore and a single document exceeds the max document size, instead of seeing the expected error message you see 'JsonSourceFile' object has no attribute 'bytes_processed'

To Reproduce
Steps to reproduce the behavior:

  1. do a rethinkdb restore that included a document larger than the default max size of 134217728 bytes

Expected behavior
you should see the error message Error: JSON max buffer size exceeded on file %s (from position %d). Use '--max-document-size' to extend your buffer."

Screenshots
If applicable, add screenshots to help explain your problem.

System info

  • OS: [e.g. macOS Mojave 10.14.3]
  • RethinkDB Version: 2.4.1

Additional context
It seems that the bug is that on this line https://github.com/rethinkdb/rethinkdb-python/blob/master/rethinkdb/_import.py#L513 I don't see bytes_processed defined anywhere - not sure if it should be _bytes_read instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnot qualifiedThe issue is not checked yet by the owners

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions