Skip to content

json2csv - memory error when input is huge [need to support Wind64] #616

Description

@chinyeungli
Traceback (most recent call last):
  File "json2csv.py", line 256, in <module>
    cli()
  File "C:\Users\CYL\git\scancode-toolkit\lib\site-packages\click\core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\CYL\git\scancode-toolkit\lib\site-packages\click\core.py", line 644, in main
    rv = self.invoke(ctx)
  File "C:\Users\CYL\git\scancode-toolkit\lib\site-packages\click\core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\CYL\git\scancode-toolkit\lib\site-packages\click\core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "json2csv.py", line 252, in cli
    json_scan_to_csv(json_input, csv_output)
  File "json2csv.py", line 80, in json_scan_to_csv
    rows = list(flatten_scan(scan_results, headers))
  File "json2csv.py", line 132, in flatten_scan
    lic = OrderedDict()
MemoryError

I get the above MemoryError when dealing with a 127MB input JSON file.
However, @JonoYang ran the same input with no problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions