Skip to content

AttributeError when converts IF to json #162

@zhilix

Description

@zhilix

I built the repo and ran the command trying to convert a physical netlist IF to a .json file:

    --schema_dir "/home/local/eda15/zhilix/projects/RapidWright/interchange/fpga-interchange-schema/interchange" \
    --schema physical \
    --input_format capnp \
    --output_format json \
    FPGA01_postroute_interchange.phys \
    FPGA01_postroute_interchange.json

But I got error message like this:

  File "/home/polaris/zhilix/.pyenv/versions/3.8.4/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/polaris/zhilix/.pyenv/versions/3.8.4/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/local/eda15/zhilix/projects/python-fpga-interchange/fpga_interchange/convert.py", line 208, in <module>
    main()
  File "/home/local/eda15/zhilix/projects/python-fpga-interchange/fpga_interchange/convert.py", line 201, in main
    message = read_format(schema, args.input_format, in_f)
  File "/home/local/eda15/zhilix/projects/python-fpga-interchange/fpga_interchange/convert.py", line 105, in read_format
    message = message.as_builder()
AttributeError: '_GeneratorContextManager' object has no attribute 'as_builder'

This is due to the from_bytes() in pycapnp library:
https://github.com/capnproto/pycapnp/issues/287

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions